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()
#endif // wxHAVE_U_ESCAPE
}
+#endif // wxUSE_UNICODE
+
void TextFileTestCase::ReadBig()
{
static const size_t NUM_LINES = 10000;
f[NUM_LINES - 1] );
}
-#endif // wxUSE_UNICODE
-
#endif // wxUSE_TEXTFILE