From ea489e1a7dd234f5c473acb6853efa649ad8a556 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 26 Feb 2016 20:11:55 +0100 Subject: [PATCH] Fix assertion in the HtmlParser unit test case Use wxHtmlWinParser instead of wxHtmlParser which can't be actually used without being initialized with the tag handlers (it's not clear whether this is really intentional...). --- tests/html/htmlparser.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/html/htmlparser.cpp b/tests/html/htmlparser.cpp index 57687ffe40..29c3cb5c1f 100644 --- a/tests/html/htmlparser.cpp +++ b/tests/html/htmlparser.cpp @@ -19,9 +19,10 @@ #endif #ifndef WX_PRECOMP + #include "wx/dcmemory.h" #endif // WX_PRECOMP -#include "wx/html/htmlpars.h" +#include "wx/html/winpars.h" // ---------------------------------------------------------------------------- // test class @@ -55,7 +56,7 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( HtmlParserTestCase, "HtmlParserTestCase" // Test that parsing invalid HTML simply fails but doesn't crash for example. void HtmlParserTestCase::Invalid() { - class NullParser : public wxHtmlParser + class NullParser : public wxHtmlWinParser { public: virtual wxObject *GetProduct() { return NULL; } @@ -65,6 +66,9 @@ void HtmlParserTestCase::Invalid() }; NullParser p; + wxMemoryDC dc; + p.SetDC(&dc); + p.Parse("<"); p.Parse("