X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6d36593cd8493851c4d46bab8750ba3772a6863..b5fe7ca67bf3121959a0b5a59afd00c1708f2f03:/tests/textfile/textfiletest.cpp diff --git a/tests/textfile/textfiletest.cpp b/tests/textfile/textfiletest.cpp index 8b5717082f..b85e9444b5 100644 --- a/tests/textfile/textfiletest.cpp +++ b/tests/textfile/textfiletest.cpp @@ -89,8 +89,8 @@ void TextFileTestCase::CreateTestFile(size_t len, const char *contents) FILE *f = fopen(GetTestFileName(), "wb"); CPPUNIT_ASSERT( f ); - CPPUNIT_ASSERT( fwrite(contents, 1, len, f) >= 0 ); - CPPUNIT_ASSERT( fclose(f) == 0 ); + CPPUNIT_ASSERT_EQUAL( len, fwrite(contents, 1, len, f) ); + CPPUNIT_ASSERT_EQUAL( 0, fclose(f) ); } void TextFileTestCase::ReadEmpty() @@ -202,6 +202,8 @@ void TextFileTestCase::ReadUTF16() #endif // wxHAVE_U_ESCAPE } +#endif // wxUSE_UNICODE + void TextFileTestCase::ReadBig() { static const size_t NUM_LINES = 10000; @@ -225,7 +227,5 @@ void TextFileTestCase::ReadBig() f[NUM_LINES - 1] ); } -#endif // wxUSE_UNICODE - #endif // wxUSE_TEXTFILE