X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/02f935fbab66563c0147b276612f750146461e69..b5fe7ca67bf3121959a0b5a59afd00c1708f2f03:/tests/intl/intltest.cpp?ds=sidebyside diff --git a/tests/intl/intltest.cpp b/tests/intl/intltest.cpp index 2b2c4b83e0..18e5be0be1 100644 --- a/tests/intl/intltest.cpp +++ b/tests/intl/intltest.cpp @@ -78,40 +78,30 @@ void IntlTestCase::tearDown() void IntlTestCase::Domain() { // _() searches all domains by default: - CPPUNIT_ASSERT( _("&Open bogus file") == "&Ouvrir un fichier" ); + CPPUNIT_ASSERT_EQUAL( "&Ouvrir un fichier", _("&Open bogus file") ); // search in our domain only: - CPPUNIT_ASSERT( wxGetTranslation("&Open bogus file", "internat") == - "&Ouvrir un fichier" ); + CPPUNIT_ASSERT_EQUAL( "&Ouvrir un fichier", wxGetTranslation("&Open bogus file", "internat") ); // search in a domain that doesn't have this string: - CPPUNIT_ASSERT( wxGetTranslation("&Open bogus file", "BogusDomain") == - "&Open bogus file" ); + CPPUNIT_ASSERT_EQUAL( "&Open bogus file", wxGetTranslation("&Open bogus file", "BogusDomain") ); } void IntlTestCase::Headers() { - CPPUNIT_ASSERT( m_locale->GetHeaderValue("Project-Id-Version") == - "wxWindows 2.0 i18n sample" ); - CPPUNIT_ASSERT( m_locale->GetHeaderValue("POT-Creation-Date") == - "1999-01-13 18:19+0100" ); - CPPUNIT_ASSERT( m_locale->GetHeaderValue("PO-Revision-Date") == - "YEAR-MO-DA HO:MI+ZONE" ); - CPPUNIT_ASSERT( m_locale->GetHeaderValue("Last-Translator") == - "Vadim Zeitlin " ); - CPPUNIT_ASSERT( m_locale->GetHeaderValue("MIME-Version") == - "1.0" ); - CPPUNIT_ASSERT( m_locale->GetHeaderValue("Content-Type") == - "text/plain; charset=iso-8859-1" ); - CPPUNIT_ASSERT( m_locale->GetHeaderValue("Content-Transfer-Encoding") == - "8bit" ); + CPPUNIT_ASSERT_EQUAL( "wxWindows 2.0 i18n sample", m_locale->GetHeaderValue("Project-Id-Version") ); + CPPUNIT_ASSERT_EQUAL( "1999-01-13 18:19+0100", m_locale->GetHeaderValue("POT-Creation-Date") ); + CPPUNIT_ASSERT_EQUAL( "YEAR-MO-DA HO:MI+ZONE", m_locale->GetHeaderValue("PO-Revision-Date") ); + CPPUNIT_ASSERT_EQUAL( "Vadim Zeitlin ", m_locale->GetHeaderValue("Last-Translator") ); + CPPUNIT_ASSERT_EQUAL( "1.0", m_locale->GetHeaderValue("MIME-Version") ); + CPPUNIT_ASSERT_EQUAL( "text/plain; charset=iso-8859-1", m_locale->GetHeaderValue("Content-Type") ); + CPPUNIT_ASSERT_EQUAL( "8bit", m_locale->GetHeaderValue("Content-Transfer-Encoding") ); // check that it fails with a bogus domain: - CPPUNIT_ASSERT( m_locale->GetHeaderValue("POT-Creation-Date", "Bogus") == - "" ); + CPPUNIT_ASSERT_EQUAL( "", m_locale->GetHeaderValue("POT-Creation-Date", "Bogus") ); // and that it fails for nonexisting header: - CPPUNIT_ASSERT( m_locale->GetHeaderValue("X-Not-Here") == "" ); + CPPUNIT_ASSERT_EQUAL( "", m_locale->GetHeaderValue("X-Not-Here") ); } #endif // wxUSE_INTL