From 869fb4f2bc662e4340c4797cf44d37af424522e9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 25 Aug 2018 21:00:11 +0200 Subject: [PATCH] Remove CppUnit compatibility macros from wxHtmlParser test There was just a single test there, so remove all CppUnit boilerplate which accounted for more than 50% of the file before adding more tests. --- tests/html/htmlparser.cpp | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/tests/html/htmlparser.cpp b/tests/html/htmlparser.cpp index 29c3cb5c1f..4577b5baf0 100644 --- a/tests/html/htmlparser.cpp +++ b/tests/html/htmlparser.cpp @@ -24,37 +24,8 @@ #include "wx/html/winpars.h" -// ---------------------------------------------------------------------------- -// test class -// ---------------------------------------------------------------------------- - -class HtmlParserTestCase : public CppUnit::TestCase -{ -public: - HtmlParserTestCase() { } - -private: - CPPUNIT_TEST_SUITE( HtmlParserTestCase ); - CPPUNIT_TEST( Invalid ); - CPPUNIT_TEST_SUITE_END(); - - void Invalid(); - - wxDECLARE_NO_COPY_CLASS(HtmlParserTestCase); -}; - -// register in the unnamed registry so that these tests are run by default -CPPUNIT_TEST_SUITE_REGISTRATION( HtmlParserTestCase ); - -// also include in its own registry so that these tests can be run alone -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( HtmlParserTestCase, "HtmlParserTestCase" ); - -// ---------------------------------------------------------------------------- -// tests themselves -// ---------------------------------------------------------------------------- - // Test that parsing invalid HTML simply fails but doesn't crash for example. -void HtmlParserTestCase::Invalid() +TEST_CASE("wxHtmlParser::ParseInvalid", "[html][parser][error]") { class NullParser : public wxHtmlWinParser {