]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/misc/garbage.cpp
Add wxCondition::Wait() overload that also tests the condition.
[wxWidgets.git] / tests / misc / garbage.cpp
index 1f81940ca2c0e3dcb4017da70f5e706ef447545f..5e4a3bf4e57feb3842e12cb983eabdb769dd20c1 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     test if loading garbage fails
 // Author:      Francesco Montorsi
 // Created:     2009-01-10
-// RCS-ID:      $Id$
 // Copyright:   (c) 2009 Francesco Montorsi
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -52,7 +51,7 @@ private:
 // register in the unnamed registry so that these tests are run by default
 CPPUNIT_TEST_SUITE_REGISTRATION( GarbageTestCase );
 
-// also include in it's own registry so that these tests can be run alone
+// also include in its own registry so that these tests can be run alone
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( GarbageTestCase, "GarbageTestCase" );
 
 
@@ -149,16 +148,7 @@ void GarbageTestCase::DoLoadFile(const wxString& fullname)
     delete htmlwin;
 */
     // test wxXmlResource
-    bool loaded = wxXmlResource::Get()->Load(fullname);
-    wxXmlResource::Get()->Unload(fullname);
-    if ( loaded )
-    {
-        CPPUNIT_FAIL
-        (
-            wxString::Format("Unexpectedly succeeded loading XRC from '%s'",
-                             fullname).ToStdString()
-        );
-    }
+    CPPUNIT_ASSERT( wxXmlResource::Get()->Load(fullname) == false );
 }
 
 void GarbageTestCase::DoLoadStream(wxInputStream& stream)