From 1ed500107b8a8fc69c3d6510d143d4a73b19bd9a Mon Sep 17 00:00:00 2001 From: Jez Higgins Date: Wed, 21 Nov 2012 07:00:25 +0000 Subject: [PATCH] bit more on getting xslttests to compile --- tests/XSLT/main_silly.cpp | 16 ++++ tests/XSLT/xslt_test.hpp | 17 ++-- vs2012/Arabica_tests.sln | 6 ++ vs2012/test_xslt_silly.vcxproj | 144 +++++++++++++++++++++++++++++++++ 4 files changed, 173 insertions(+), 10 deletions(-) create mode 100644 tests/XSLT/main_silly.cpp create mode 100644 vs2012/test_xslt_silly.vcxproj diff --git a/tests/XSLT/main_silly.cpp b/tests/XSLT/main_silly.cpp new file mode 100644 index 00000000..791efc8b --- /dev/null +++ b/tests/XSLT/main_silly.cpp @@ -0,0 +1,16 @@ +#ifdef _MSC_VER +#pragma warning(disable : 4250) +#endif + + +// #include "scope_test.hpp" +#include "xslt_test.hpp" +#include "../silly_string/silly_string.hpp" + +int main(int argc, const char* argv[]) +{ + bool ok = XSLT_test_suite(argc, argv); + //return !ok; + return 77; // the make check magic ignore this result marker +} // main + diff --git a/tests/XSLT/xslt_test.hpp b/tests/XSLT/xslt_test.hpp index e3a785e4..67fccc16 100644 --- a/tests/XSLT/xslt_test.hpp +++ b/tests/XSLT/xslt_test.hpp @@ -26,10 +26,6 @@ #include #include -//#include -//#include -//#include -//#include #include class Expected; @@ -61,13 +57,14 @@ const std::string PATH_PREFIX=test_path; const std::string SEPERATOR = "/"; #endif -Arabica::DOM::Document buildDOM(const std::string& filename) +template +Arabica::DOM::Document buildDOM(const std::string& filename) { - Arabica::SAX::InputSource is(filename); - Arabica::SAX2DOM::Parser parser; + Arabica::SAX::InputSource is(filename); + Arabica::SAX2DOM::Parser parser; parser.parse(is); - Arabica::DOM::Document d = parser.getDocument(); + Arabica::DOM::Documentstring_type, string_adaptor> d = parser.getDocument(); if(d != 0) d.normalize(); return d; @@ -582,7 +579,7 @@ public: return; std::cerr << "Loaded expected fails" << std::endl; - Arabica::DOM::Document fail_doc = buildDOM(PATH_PREFIX + "arabica-expected-fails.xml"); + Arabica::DOM::Document fail_doc = buildDOM(PATH_PREFIX + "arabica-expected-fails.xml"); Arabica::XPath::NodeSet failcases = selectNodes("/test-suite/test-case", fail_doc); for(size_t i = 0; i != failcases.size(); ++i) { @@ -754,7 +751,7 @@ bool XSLT_test_suite(int argc, const char* argv[]) // runner.addTest("ScopeTest", ScopeTest_suite()); - Loader > loader; + Loader loader; //add_tests(runner, loader, tests_to_run, xalan_tests); //add_tests(runner, loader, tests_to_run, msft_tests); diff --git a/vs2012/Arabica_tests.sln b/vs2012/Arabica_tests.sln index 0ffadd8e..03ccf127 100644 --- a/vs2012/Arabica_tests.sln +++ b/vs2012/Arabica_tests.sln @@ -28,6 +28,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_xslt", "test_xslt.vcxp EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_xslt_wide", "test_xslt_wide.vcxproj", "{B4FB0A94-1792-43F1-A57F-4D77AB7593DB}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_xslt_silly", "test_xslt_silly.vcxproj", "{9FBD30C4-8588-49A8-95E4-471307B57F7E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -90,6 +92,10 @@ Global {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 + {9FBD30C4-8588-49A8-95E4-471307B57F7E}.Debug|Win32.ActiveCfg = Debug|Win32 + {9FBD30C4-8588-49A8-95E4-471307B57F7E}.Debug|Win32.Build.0 = Debug|Win32 + {9FBD30C4-8588-49A8-95E4-471307B57F7E}.Release|Win32.ActiveCfg = Release|Win32 + {9FBD30C4-8588-49A8-95E4-471307B57F7E}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/vs2012/test_xslt_silly.vcxproj b/vs2012/test_xslt_silly.vcxproj new file mode 100644 index 00000000..90c99d11 --- /dev/null +++ b/vs2012/test_xslt_silly.vcxproj @@ -0,0 +1,144 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {9FBD30C4-8588-49A8-95E4-471307B57F7E} + Win32Proj + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\bin\ + .\Debug_test_xslt_silly\ + true + .\..\bin\ + .\Release_test_xslt_silly\ + false + xslt_test_silly + xslt_test_silly + 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 + + + + + + \ No newline at end of file