+#endif // __WXX11__
+}
+
+void ColourTestCase::FromString()
+{
+ ASSERT_EQUAL_RGB( wxColour("rgb(11, 22, 33)"), 11, 22, 33 );
+ ASSERT_EQUAL_RGBA( wxColour("rgba(11, 22, 33, 0.5)"), 11, 22, 33, 128 );
+ ASSERT_EQUAL_RGBA( wxColour("rgba( 11, 22, 33, 0.5 )"), 11, 22, 33, 128 );
+
+ ASSERT_EQUAL_RGB( wxColour("#aabbcc"), 0xaa, 0xbb, 0xcc );
+
+ ASSERT_EQUAL_RGB( wxColour("red"), 0xff, 0, 0 );
+
+ wxColour col;
+ CPPUNIT_ASSERT( !wxFromString("rgb(1, 2)", &col) );
+ CPPUNIT_ASSERT( !wxFromString("rgba(1, 2, 3.456)", &col) );
+ CPPUNIT_ASSERT( !wxFromString("rgba(1, 2, 3.456, foo)", &col) );