+void FileTestCase::ReadAll()
+{
+ TestFile tf;
+
+ const char* text = "Ream\nde";
+
+ {
+ wxFile fout(tf.GetName(), wxFile::write);
+ CPPUNIT_ASSERT( fout.IsOpened() );
+ fout.Write(text, strlen(text));
+ CPPUNIT_ASSERT( fout.Close() );
+ }
+
+ {
+ wxFile fin(tf.GetName(), wxFile::read);
+ CPPUNIT_ASSERT( fin.IsOpened() );
+
+ wxString s;
+ CPPUNIT_ASSERT( fin.ReadAll(&s) );
+ CPPUNIT_ASSERT_EQUAL( text, s );
+ }
+}
+