+#define MAX_TEST_LEN 1024
+
+
+// temporary buffers
+static wxChar buf[MAX_TEST_LEN];
+
+// these macros makes it possible to write all tests without repeating a lot of times wxT() macro
+
+#define ASSERT_STR_EQUAL( a, b ) \
+ CPPUNIT_ASSERT_EQUAL( wxString(a), wxString(b) );
+
+#define CMP5(expected, x, y, z, w) \
+ wxSnprintf(buf, MAX_TEST_LEN, wxT(x), y, z, w); \
+ \
+ ASSERT_STR_EQUAL( wxT(expected), buf );
+
+#define CMP4(expected, x, y, z) \
+ wxSnprintf(buf, MAX_TEST_LEN, wxT(x), y, z); \
+ \
+ ASSERT_STR_EQUAL( wxT(expected), buf );
+
+#define CMP3(expected, x, y) \
+ wxSnprintf(buf, MAX_TEST_LEN, wxT(x), y); \
+ \
+ ASSERT_STR_EQUAL( wxT(expected), buf );
+
+#define CMP2(expected, x) \
+ wxSnprintf(buf, MAX_TEST_LEN, wxT(x)); \
+ \
+ ASSERT_STR_EQUAL( wxT(expected), buf );
+
+#define CMPTOSIZE(buffer, size, expected, fmt, x, y, z, w) \
+ wxSnprintf(buffer, size, wxT(fmt), x, y, z, w); \
+ \
+ CPPUNIT_ASSERT_EQUAL( wxString(wxT(expected)).Left(size - 1), \
+ wxString(buffer) )
+
+