]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/textfile/textfiletest.cpp
rename ARRAYSIZE to CELLSARRAYSIZE to avoid conflict with a macro with the same name...
[wxWidgets.git] / tests / textfile / textfiletest.cpp
index 8b5717082f99b8a93836a151c8b7624f1a568ec9..b85e9444b5e2e486dfcbb28e6fa6e686226a0bb4 100644 (file)
@@ -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