]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/textfile/textfiletest.cpp
added wxICON_NONE and implement support for it in wxGTK (closes #2897)
[wxWidgets.git] / tests / textfile / textfiletest.cpp
index aa93472894b2d3837262d5167ece8eeb173ee46a..25d3f830f4a9cde991841b4347a221173287d568 100644 (file)
 #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()