]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/menu/accelentry.cpp
fixes potential crash under gatekeeper
[wxWidgets.git] / tests / menu / accelentry.cpp
index b1863db0cf00713c3f08620a7be8bb6bfef5bfae..da871f79d06659f7b56859df6932291ec9df863f 100644 (file)
@@ -43,7 +43,7 @@ private:
 // register in the unnamed registry so that these tests are run by default
 CPPUNIT_TEST_SUITE_REGISTRATION( AccelEntryTestCase );
 
-// 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( AccelEntryTestCase, "AccelEntryTestCase" );
 
 namespace
@@ -67,10 +67,13 @@ void AccelEntryTestCase::Create()
     CheckAccelEntry(*pa, 'Z', wxACCEL_CTRL);
 
 
+    // There must be a TAB in the string passed to Create()
     pa.reset(wxAcceleratorEntry::Create("Shift-Q"));
+    CPPUNIT_ASSERT( !pa );
+
+    pa.reset(wxAcceleratorEntry::Create("Bar\tShift-Q"));
     CPPUNIT_ASSERT( pa );
     CPPUNIT_ASSERT( pa->IsOk() );
-
     CheckAccelEntry(*pa, 'Q', wxACCEL_SHIFT);