mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-17 18:12:04 +01:00
gcc 4.0.2 fixes
Use ARABICA_NO_WCHAR_T to exclude the bits that don't build under Cygwin
This commit is contained in:
parent
b312078ac5
commit
2b051fc1ff
5 changed files with 22 additions and 5 deletions
|
@ -2,12 +2,20 @@
|
|||
#pragma warning(disable: 4786 4250 4503)
|
||||
#endif
|
||||
|
||||
#ifndef ARABICA_NO_WCHAR_T
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#include "../DOM/dom_test_suite.hpp"
|
||||
|
||||
////////////////////////////////////////////////
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
#ifndef ARABICA_NO_WCHAR_T
|
||||
DOM_test_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >(argc, argv);
|
||||
#else
|
||||
std::cout << "No DOM_wide tests on this platform :)" << std::endl;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
} // main
|
||||
|
|
|
@ -23,8 +23,9 @@ int main(int argc, const char* argv[])
|
|||
|
||||
runner.addTest("SAX2DOMTest", SAXTest_suite<std::string, Arabica::default_string_adaptor<std::string> >());
|
||||
runner.addTest("SAX2DOMTest_silly", SAXTest_suite<silly_string, silly_string_adaptor>());
|
||||
#ifndef ARABICA_NO_WCHAR_T
|
||||
runner.addTest("SAX2DOMTest_wide", SAXTest_suite<std::wstring, Arabica::default_string_adaptor<std::wstring> >());
|
||||
|
||||
#endif
|
||||
runner.run(argc, argv);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -3,14 +3,19 @@
|
|||
#pragma warning(disable:4224 4267)
|
||||
#endif
|
||||
|
||||
#ifndef ARABICA_NO_WCHAR_T
|
||||
#include <iostream>
|
||||
#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<std::wstring, Arabica::default_string_adaptor<std::wstring> >(argc, argv);
|
||||
#else
|
||||
std::cout << "No wide tests on this platform" << std::endl;
|
||||
#endif
|
||||
} // main
|
||||
|
||||
|
|
|
@ -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<wchar_t, std::char_traits<wchar_t>,
|
||||
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue