#include "wx/afterstd.h"
#include "wx/string.h"
-#include "wx/filefn.h" // for wxFileOffset
///////////////////////////////////////////////////////////////////////////////
assertEquals(wxString(expected), actual, sourceLine, message);
}
+CPPUNIT_NS_END
+
+// define an assertEquals() overload for the given types, this is a helper and
+// shouldn't be used directly because of VC6 complications, see below
#define WX_CPPUNIT_ASSERT_EQUALS(T1, T2) \
inline void \
assertEquals(T1 expected, \
} \
}
-// and another to be able to specify (usually literal) ints as expected values
-// for functions returning size_t/short/long/wxFileOffset
-WX_CPPUNIT_ASSERT_EQUALS(int, long)
-WX_CPPUNIT_ASSERT_EQUALS(int, short)
-WX_CPPUNIT_ASSERT_EQUALS(int, size_t)
-WX_CPPUNIT_ASSERT_EQUALS(int, wxFileOffset)
-
-// special section with VC6 workarounds: due to incorrect resolution of
-// overloaded/template functions in this compiler (it basically doesn't use the
-// template version at all if any overloaded function matches partially even if
-// none of them matches fully) we also need
-#ifdef __VISUALC6__
-
-WX_CPPUNIT_ASSERT_EQUALS(int, int)
-WX_CPPUNIT_ASSERT_EQUALS(long, long)
-WX_CPPUNIT_ASSERT_EQUALS(short, short)
-WX_CPPUNIT_ASSERT_EQUALS(size_t, size_t)
-WX_CPPUNIT_ASSERT_EQUALS(wxFileOffset, wxFileOffset)
-
-#endif // VC6
+// this macro allows us to specify (usually literal) ints as expected values
+// for functions returning integral types different from "int"
+//
+// FIXME-VC6: due to incorrect resolution of overloaded/template functions in
+// this compiler (it basically doesn't use the template version at
+// all if any overloaded function matches partially even if none of
+// them matches fully) we also need to provide extra overloads
-CPPUNIT_NS_END
+#ifdef __VISUALC6__
+ #define WX_CPPUNIT_ALLOW_EQUALS_TO_INT(T) \
+ CPPUNIT_NS_BEGIN \
+ WX_CPPUNIT_ASSERT_EQUALS(int, T) \
+ WX_CPPUNIT_ASSERT_EQUALS(T, T) \
+ CPPUNIT_NS_END
+
+ CPPUNIT_NS_BEGIN
+ WX_CPPUNIT_ASSERT_EQUALS(int, int)
+ CPPUNIT_NS_END
+#else // !VC6
+ #define WX_CPPUNIT_ALLOW_EQUALS_TO_INT(T) \
+ CPPUNIT_NS_BEGIN \
+ WX_CPPUNIT_ASSERT_EQUALS(int, T) \
+ CPPUNIT_NS_END
+#endif // VC6/!VC6
+
+WX_CPPUNIT_ALLOW_EQUALS_TO_INT(long)
+WX_CPPUNIT_ALLOW_EQUALS_TO_INT(short)
+WX_CPPUNIT_ALLOW_EQUALS_TO_INT(size_t)
// Use this macro to compare a wxArrayString with the pipe-separated elements
// of the given string
<?xml version="1.0" encoding="Windows-1252"?>\r
-<!--\r
-\r
- This makefile was generated by\r
- Bakefile 0.2.5 (http://www.bakefile.org)\r
- Do not modify, all changes will be overwritten!\r
-\r
--->\r
<VisualStudioProject\r
ProjectType="Visual C++"\r
Version="7.10"\r
</Configuration>\r
</Configurations>\r
<References>\r
- \r
</References>\r
<Files>\r
<Filter\r
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">\r
<File\r
RelativePath=".\archive\archivetest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\arrays\arrays.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\thread\atomic.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\base64\base64.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\bstream.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\cmdline\cmdlinetest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\mbconv\convautotest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\strings\crt.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\datastreamtest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\datetime\datetimetest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\dummy.cpp">\r
</File>\r
<File\r
RelativePath=".\weakref\evtconnection.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\ffilestream.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\fileback.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\config\fileconf.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\filekind\filekind.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\filename\filenametest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\filestream.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\filesys\filesystest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\fontmap\fontmaptest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\formatconverter\formatconvertertest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\hashes\hashes.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\intl\intltest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\strings\iostream.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\iostreams.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\net\ipc.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\largefile.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\lists\lists.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\longlong\longlongtest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\mbconv\mbconvtest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\memstream.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\misc\misctests.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\thread\queue.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\regex\regextest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\scopeguard\scopeguardtest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\net\socket.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\socketstream.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\sstream.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\strings\stdstrings.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\strings\strings.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\archive\tartest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\tempfile.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\test.cpp">\r
</File>\r
<File\r
RelativePath=".\textfile\textfiletest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\textstreamtest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\events\timertest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\thread\tls.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\strings\tokenizer.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\strings\unichar.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\strings\unicode.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\uris\uris.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\strings\vararg.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\vectors\vectors.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\strings\vsnprintf.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\weakref\weakref.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\regex\wxregextest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\xlocale\xlocale.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\xml\xmltest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\archive\ziptest.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
<File\r
RelativePath=".\streams\zlibstream.cpp">\r
+ <FileConfiguration\r
+ Name="Debug|Win32"\r
+ ExcludedFromBuild="TRUE">\r
+ <Tool\r
+ Name="VCCLCompilerTool"/>\r
+ </FileConfiguration>\r
</File>\r
</Filter>\r
</Files>\r
<Globals>\r
- \r
</Globals>\r
</VisualStudioProject>\r
-\r