00001 #ifndef hpp_AllTests_hpp 00002 #define hpp_AllTests_hpp 00003 00004 // We need NTreeTests 00005 #include "NTreeTests.hpp" 00006 // We need ParserTests 00007 #include "ParserTests.hpp" 00008 // We need DOMTests 00009 #include "DOMTests.hpp" 00010 // We need renderer tests 00011 #include "RendererTests.hpp" 00012 // We need validation tests 00013 #include "ValidationTests.hpp" 00014 00015 00016 namespace Tests 00017 { 00018 void launchTests() 00019 { 00020 Test::Vector xVector; 00021 Bstrlib::String results; 00022 xVector.addUnitToTest(Test::MakeLineDelimiter("==================== Test vectors below ===================")); 00023 00024 // NTree testing 00025 createNTreeTests(xVector, results); 00026 00027 NTreeTest::TestDeletion xTD; 00028 typedef Bstrlib::String String; 00029 xVector.addUnitToTest(Test::MakeUnitTest(MakeTestName( "Checking node deletion refcount (should be zero here)" ), xTD, &NTreeTest::TestDeletion::checkDeletion)); 00030 00031 // Parser testing 00032 createParserTests(xVector, results); 00033 00034 // DOM tree testing 00035 createDOMTests(xVector, results); 00036 00037 // Renderer testing 00038 createRendererTests(xVector, results); 00039 00040 // Validation testing 00041 createValidationTests(xVector, results); 00042 00043 // Execute all tests 00044 xVector.addUnitToTest(Test::MakeLineDelimiter("==================== End of Test vectors ===================\n")); 00045 00046 00047 00048 // If there is any remaining tests, do them 00049 results = xVector.testAllVectors(results); 00050 00051 00052 // Then output the results to console 00053 for (int i = 0; i < results.getLength(); i+=1023) 00054 { 00055 DebugText((const char*)results.midString(i, 1023)); 00056 } 00057 } 00058 } 00059 00060 #endif