diff --git a/test/DOM_wide/main.cpp b/test/DOM_wide/main.cpp index e1440cfe..bd0a79ed 100644 --- a/test/DOM_wide/main.cpp +++ b/test/DOM_wide/main.cpp @@ -2,12 +2,20 @@ #pragma warning(disable: 4786 4250 4503) #endif +#ifndef ARABICA_NO_WCHAR_T +#include +#endif + #include "../DOM/dom_test_suite.hpp" //////////////////////////////////////////////// int main(int argc, const char* argv[]) { +#ifndef ARABICA_NO_WCHAR_T DOM_test_suite >(argc, argv); +#else + std::cout << "No DOM_wide tests on this platform :)" << std::endl; +#endif return 0; } // main diff --git a/test/SAX2DOM/main.cpp b/test/SAX2DOM/main.cpp index fb3ed3cc..748ae637 100644 --- a/test/SAX2DOM/main.cpp +++ b/test/SAX2DOM/main.cpp @@ -23,8 +23,9 @@ int main(int argc, const char* argv[]) runner.addTest("SAX2DOMTest", SAXTest_suite >()); runner.addTest("SAX2DOMTest_silly", SAXTest_suite()); +#ifndef ARABICA_NO_WCHAR_T runner.addTest("SAX2DOMTest_wide", SAXTest_suite >()); - +#endif runner.run(argc, argv); return 0; diff --git a/test/XPath_wide/main.cpp b/test/XPath_wide/main.cpp index 7d1d537c..c30198e5 100644 --- a/test/XPath_wide/main.cpp +++ b/test/XPath_wide/main.cpp @@ -3,14 +3,19 @@ #pragma warning(disable:4224 4267) #endif +#ifndef ARABICA_NO_WCHAR_T #include +#endif + #include "../XPath/xpath_test_suite.hpp" ///////////////////////////////////////// int main(int argc, const char** argv) { - std::cout << "Hello" << std::endl; - +#ifndef ARABICA_NO_WCHAR_T XPath_test_suite >(argc, argv); +#else + std::cout << "No wide tests on this platform" << std::endl; +#endif } // main diff --git a/test/silly_string/silly_string.cpp b/test/silly_string/silly_string.cpp index fcdf378b..e38ba2d7 100644 --- a/test/silly_string/silly_string.cpp +++ b/test/silly_string/silly_string.cpp @@ -52,6 +52,7 @@ silly_string silly_string_adaptor::construct_from_utf8(const char* str, int leng return s; } // construct_from_utf8 +#ifndef ARABICA_NO_WCHAR_T silly_string silly_string_adaptor::construct_from_utf16(const wchar_t* str) { Arabica::convert::basic_oconvertstream, @@ -73,6 +74,7 @@ silly_string silly_string_adaptor::construct_from_utf16(const wchar_t* str, int s.s_ = narrower.str(); return s; } // construct_from_utf16 +#endif bool silly_string_adaptor::empty(const silly_string& s) { diff --git a/test/silly_string/silly_string.hpp b/test/silly_string/silly_string.hpp index fa8856d8..e60f9d31 100644 --- a/test/silly_string/silly_string.hpp +++ b/test/silly_string/silly_string.hpp @@ -24,7 +24,7 @@ private: friend class silly_string_adaptor; }; // class silly_string -class silly_string_adaptor +class silly_string_adaptor { public: typedef silly_string string_type; @@ -52,9 +52,10 @@ public: static char convert_from_utf8(char c); static silly_string construct_from_utf8(const char* str); static silly_string construct_from_utf8(const char* str, int length); +#ifndef ARABICA_NO_WCHAR_T static silly_string construct_from_utf16(const wchar_t* str); static silly_string construct_from_utf16(const wchar_t* str, int length); - +#endif // here we go static bool empty(const silly_string& s);