X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14b4f6fcc0e3893a73c628de528febd043a1109e..7e3204b45cf8e1bb882b314d456e75f2a22850d7:/tests/textfile/textfiletest.cpp diff --git a/tests/textfile/textfiletest.cpp b/tests/textfile/textfiletest.cpp index aa93472894..25d3f830f4 100644 --- a/tests/textfile/textfiletest.cpp +++ b/tests/textfile/textfiletest.cpp @@ -25,6 +25,10 @@ #include "wx/ffile.h" #include "wx/textfile.h" +#ifdef __VISUALC__ + #define unlink _unlink +#endif + // ---------------------------------------------------------------------------- // test class // ---------------------------------------------------------------------------- @@ -89,8 +93,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()