[Mockpp-commits] mockpp/mockpp/tests Formatter_test.cpp,1.22,1.23
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-04-09 15:32:56
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25765/mockpp/tests Modified Files: Formatter_test.cpp Log Message: make char/wchar_t more readable Index: Formatter_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Formatter_test.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- Formatter_test.cpp 5 Mar 2005 14:53:41 -0000 1.22 +++ Formatter_test.cpp 9 Apr 2005 15:32:45 -0000 1.23 @@ -401,7 +401,11 @@ << (signed char)('7') << (signed char)('8') << (signed char)('9'); +#ifndef MOCKPP_MAKE_CHAR_READABLE MOCKPP_ASSERT_EQUALS(fmt, MOCKPP_PCSTRING("9876543210")); +#else + MOCKPP_ASSERT_EQUALS(fmt, MOCKPP_PCSTRING("{\"9\", 0x39}{\"8\", 0x38}{\"7\", 0x37}{\"6\", 0x36}{\"5\", 0x35}{\"4\", 0x34}{\"3\", 0x33}{\"2\", 0x32}{\"1\", 0x31}{\"0\", 0x30}")); +#endif fmt = MOCKPP_PCHAR("%9%8%7%6%5%4%3%2%1%0"); fmt << (unsigned char)('0') @@ -414,7 +418,11 @@ << (unsigned char)('7') << (unsigned char)('8') << (unsigned char)('9'); +#ifndef MOCKPP_MAKE_CHAR_READABLE MOCKPP_ASSERT_EQUALS(fmt, MOCKPP_PCSTRING("9876543210")); +#else + MOCKPP_ASSERT_EQUALS(fmt, MOCKPP_PCSTRING("{\"9\", 0x39}{\"8\", 0x38}{\"7\", 0x37}{\"6\", 0x36}{\"5\", 0x35}{\"4\", 0x34}{\"3\", 0x33}{\"2\", 0x32}{\"1\", 0x31}{\"0\", 0x30}")); +#endif fmt = MOCKPP_PCHAR("%9%8%7%6%5%4%3%2%1%0"); fmt << (char)('0') @@ -427,7 +435,11 @@ << (char)('7') << (char)('8') << (char)('9'); +#ifndef MOCKPP_MAKE_CHAR_READABLE MOCKPP_ASSERT_EQUALS(fmt, MOCKPP_PCSTRING("9876543210")); +#else + MOCKPP_ASSERT_EQUALS(fmt, MOCKPP_PCSTRING("{\"9\", 0x39}{\"8\", 0x38}{\"7\", 0x37}{\"6\", 0x36}{\"5\", 0x35}{\"4\", 0x34}{\"3\", 0x33}{\"2\", 0x32}{\"1\", 0x31}{\"0\", 0x30}")); +#endif fmt = MOCKPP_PCHAR("%9%8%7%6%5%4%3%2%1%0"); fmt << MOCKPP_CHAR('0') @@ -440,7 +452,11 @@ << MOCKPP_CHAR('7') << MOCKPP_CHAR('8') << MOCKPP_CHAR('9'); +#ifndef MOCKPP_MAKE_CHAR_READABLE MOCKPP_ASSERT_EQUALS(fmt, MOCKPP_PCSTRING("9876543210")); +#else + MOCKPP_ASSERT_EQUALS(fmt, MOCKPP_PCSTRING("{\"9\", 0x39}{\"8\", 0x38}{\"7\", 0x37}{\"6\", 0x36}{\"5\", 0x35}{\"4\", 0x34}{\"3\", 0x33}{\"2\", 0x32}{\"1\", 0x31}{\"0\", 0x30}")); +#endif } |