From: Francesco Chemolli Date: Mon, 1 Jun 2020 19:45:25 +0000 (+0000) Subject: Make testUriScheme independent of translation unit order (#645) X-Git-Tag: SQUID_5_0_4~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=689997abec5139a60069dc69deffaa88d409471d;p=thirdparty%2Fsquid.git Make testUriScheme independent of translation unit order (#645) Changing the translation unit linkage order will break testUriScheme. Use explicit subsystems initialization, like testURL already does. --- diff --git a/src/tests/testUriScheme.cc b/src/tests/testUriScheme.cc index 00e75ac992..b58b6505b2 100644 --- a/src/tests/testUriScheme.cc +++ b/src/tests/testUriScheme.cc @@ -155,3 +155,9 @@ testUriScheme::testStream() CPPUNIT_ASSERT_EQUAL(http_str, from_buf); } +void +testUriScheme::setUp() +{ + Mem::Init(); + AnyP::UriScheme::Init(); +} diff --git a/src/tests/testUriScheme.h b/src/tests/testUriScheme.h index 1ca3afff4a..a324cdc853 100644 --- a/src/tests/testUriScheme.h +++ b/src/tests/testUriScheme.h @@ -35,6 +35,7 @@ class testUriScheme : public CPPUNIT_NS::TestFixture CPPUNIT_TEST_SUITE_END(); public: + void setUp(); protected: void testAssignFromprotocol_t();