diff --git a/tests/XSLT/main_wide.cpp b/tests/XSLT/main_wide.cpp index 6733f7fe..6436b66a 100644 --- a/tests/XSLT/main_wide.cpp +++ b/tests/XSLT/main_wide.cpp @@ -2,97 +2,13 @@ #pragma warning(disable : 4250) #endif -#include -#include -#include -#include - -/////////////////////////////////////////////// -#include "../CppUnit/TestRunner.hpp" -#include "../CppUnit/framework/Test.h" -#include "../CppUnit/framework/TestCase.h" -#include "../CppUnit/framework/TestSuite.h" // #include "scope_test.hpp" #include "xslt_test.hpp" - -std::set parse_tests_to_run(int argc, const char* argv[]); -void add_tests(TestRunner& runner, Loader& loader, const std::set& wanted, const char** test_names); -void add_arabica_tests(TestRunner& runner, Loader& loader, const std::set& wanted, const char** test_names); - -const char* xalan_tests[] = {"attribvaltemplate", "axes", "boolean", "conditional", - "conflictres", "copy", "dflt", "expression", "extend", - /*"idkey",*/ "impincl", "lre", "match", "math", - "mdocs", "message", "modes", "namedtemplate", - "namespace", "node", /*"numberformat",*/ /*"numbering",*/ - "output", "position", "predicate", "processorinfo", "reluri", - "select", "sort", "string", "variable", "ver", "whitespace", 0}; - -const char* msft_tests[] = { "AVTs", /*"AttributeSets",*/ "Attributes", "BVTs", - "Comment", "Completeness", "ConflictResolution", "Copying", - "Elements", "Errors", "Fallback", "ForEach", /*"FormatNumber",*/ - "ForwardComp", "Import", "Keys", "Messages", - "Miscellaneous", "Modes", "NamedTemplates", "Namespace", - "Namespace-alias", "Namespace_XPath", /*"Number",*/ - /*"Output",*/ "ProcessingInstruction", "RTF", "Sorting", - "Stylesheet", "Template", "Text", "Valueof", - "Variables", "Whitespaces", "XSLTFunctions", 0 }; - -const char* arabica_tests[] = { "attributes", - "errors", "include", "processing-instruction", - "stylesheet", "text", "variables", 0 }; - int main(int argc, const char* argv[]) { - TestRunner runner; - std::set tests_to_run = parse_tests_to_run(argc, argv); - - // runner.addTest("ScopeTest", ScopeTest_suite()); - - Loader loader; - - add_tests(runner, loader, tests_to_run, xalan_tests); - add_tests(runner, loader, tests_to_run, msft_tests); - add_arabica_tests(runner, loader, tests_to_run, arabica_tests); - - runner.run(argc, argv); - - return 77; + bool ok = XSLT_test_suite >(argc, argv); + //return !ok; + return 77; // the make check magic ignore this result marker } // main -std::set parse_tests_to_run(int argc, const char* argv[]) -{ - std::set tests; - for(int a = 1; a != argc; ++a) - if(argv[a][0] != '-') - tests.insert(argv[a]); - else - { - if(std::string(argv[a]) == "-log") - ++a; // skip next - } // if ... - - return tests; -} // tests_to_run - -void add_tests(TestRunner& runner, Loader& loader, const std::set& wanted, const char** test_names) -{ - std::set::const_iterator end = wanted.end(); - while(*test_names != 0) - { - if(wanted.empty() || (wanted.find(*test_names) != end)) - runner.addTest(*test_names, loader.XSLTTest_suite(*test_names)); - ++test_names; - } // while ... -} // all_all_tests - -void add_arabica_tests(TestRunner& runner, Loader& loader, const std::set& wanted, const char** test_names) -{ - std::set::const_iterator end = wanted.end(); - while(*test_names != 0) - { - if(wanted.empty() || (wanted.find(*test_names) != end)) - runner.addTest(*test_names, loader.ArabicaTest_suite(*test_names)); - ++test_names; - } // while ... -} // all_all_tests diff --git a/vs2012/Arabica_tests.sln b/vs2012/Arabica_tests.sln index dadef1e8..0ffadd8e 100644 --- a/vs2012/Arabica_tests.sln +++ b/vs2012/Arabica_tests.sln @@ -1,5 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2012 for Windows Desktop Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArabicaLib", "lib_arabica.vcxproj", "{4CA72415-D03A-4447-BE4E-C093A5146CAC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_DOM", "test_DOM.vcxproj", "{74A66132-475A-4DA1-8EF7-9CB0EF71E3D8}" @@ -26,6 +26,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_xpath_wide", "test_xpa EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_xslt", "test_xslt.vcxproj", "{44BA3424-C58E-4A49-ADDD-6180C61E5E34}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_xslt_wide", "test_xslt_wide.vcxproj", "{B4FB0A94-1792-43F1-A57F-4D77AB7593DB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -84,6 +86,10 @@ Global {44BA3424-C58E-4A49-ADDD-6180C61E5E34}.Debug|Win32.Build.0 = Debug|Win32 {44BA3424-C58E-4A49-ADDD-6180C61E5E34}.Release|Win32.ActiveCfg = Release|Win32 {44BA3424-C58E-4A49-ADDD-6180C61E5E34}.Release|Win32.Build.0 = Release|Win32 + {B4FB0A94-1792-43F1-A57F-4D77AB7593DB}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4FB0A94-1792-43F1-A57F-4D77AB7593DB}.Debug|Win32.Build.0 = Debug|Win32 + {B4FB0A94-1792-43F1-A57F-4D77AB7593DB}.Release|Win32.ActiveCfg = Release|Win32 + {B4FB0A94-1792-43F1-A57F-4D77AB7593DB}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/vs2012/test_xslt_wide.vcxproj b/vs2012/test_xslt_wide.vcxproj index daca35b8..0934ec43 100644 --- a/vs2012/test_xslt_wide.vcxproj +++ b/vs2012/test_xslt_wide.vcxproj @@ -11,7 +11,7 @@ - {44BA3424-C58E-4A49-ADDD-6180C61E5E34} + {B4FB0A94-1792-43F1-A57F-4D77AB7593DB} Win32Proj @@ -45,8 +45,8 @@ .\..\bin\ .\Release_test_xslt\ false - xslt_test - xslt_test + xslt_test_wide + xslt_test_wide C:\work\usr\include;$(IncludePath) C:\work\usr\lib;$(LibraryPath) @@ -115,7 +115,6 @@ - @@ -142,4 +141,4 @@ - + \ No newline at end of file diff --git a/vs2012/test_xslt_wide.vcxproj.bak b/vs2012/test_xslt_wide.vcxproj.bak new file mode 100644 index 00000000..daca35b8 --- /dev/null +++ b/vs2012/test_xslt_wide.vcxproj.bak @@ -0,0 +1,145 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {44BA3424-C58E-4A49-ADDD-6180C61E5E34} + Win32Proj + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\bin\ + .\Debug_test_xslt\ + true + .\..\bin\ + .\Release_test_xslt\ + false + xslt_test + xslt_test + C:\work\usr\include;$(IncludePath) + C:\work\usr\lib;$(LibraryPath) + + + + /Zm1000 %(AdditionalOptions) + Disabled + Default + ..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + false + Default + MultiThreadedDebugDLL + false + true + true + true + + + Level3 + EditAndContinue + + + ..\lib\arabica-debug.lib;..\lib\cppunit-debug.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName).exe + true + $(OutDir)$(TargetName).pdb + Console + false + + + NotSet + false + + + + + /Zm1000 %(AdditionalOptions) + ..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + false + true + true + true + + + Level3 + ProgramDatabase + + + ..\lib\arabica.lib;..\lib\cppunit.lib;%(AdditionalDependencies) + $(OutDir)$(TargetName).exe + false + Console + + + + + false + + + NotSet + false + + + + + + + + + + + + + + + + + {4ca72415-d03a-4447-be4e-c093a5146cac} + false + + + {74a66132-475a-4da1-8ef7-9cb0ef71e3d8} + false + + + {b3c75b3a-bb0a-4b23-87f9-fb9cd98ff8ce} + false + + + + + +