]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/strings/crt.cpp
Fixed bug: wxPropertyGridInterface::SetPropertyReadOnly() with wxPG_DONT_RECURSE...
[wxWidgets.git] / tests / strings / crt.cpp
index 8855068748b03d93295905aa76514954cf7cfd4b..61dc5afcc6e05d403c1dfa45d1305ba2588ac779 100644 (file)
@@ -207,18 +207,12 @@ void CrtTestCase::Strpbrk()
     CPPUNIT_ASSERT_EQUAL(  ',', *wxStrpbrk(strWX.c_str(), s.mb_str()) );
     CPPUNIT_ASSERT_EQUAL( L',', *wxStrpbrk(strWX.c_str(), s.wc_str()) );
 
-    CPPUNIT_ASSERT_EQUAL( (char *)NULL, wxStrpbrk(strWX, "xyz") );
-    CPPUNIT_ASSERT_EQUAL( (wchar_t *)NULL, wxStrpbrk(strWX.c_str(), L"xyz") );
+    CPPUNIT_ASSERT( !wxStrpbrk(strWX, "xyz") );
+    CPPUNIT_ASSERT( !wxStrpbrk(strWX.c_str(), L"xyz") );
 }
 
 void CrtTestCase::Strnlen()
 {
-    // the following calls should not segfault/crash because when passing 0
-    // as maxlen, no bytes at all should be read from the given buffer
-    // (which is NULL in this case!)
-    CPPUNIT_ASSERT_EQUAL(  (size_t)0, wxStrnlen((const char*)NULL, 0) );
-    CPPUNIT_ASSERT_EQUAL(  (size_t)0, wxStrnlen((const wchar_t*)NULL, 0) );
-
     // other misc tests for wxStrnlen(const char*, size_t)
 
     CPPUNIT_ASSERT_EQUAL(  (size_t)0, wxStrnlen("", 0) );