]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Make testUriScheme independent of translation unit order (#645)
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 1 Jun 2020 19:45:25 +0000 (19:45 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 1 Jun 2020 19:45:28 +0000 (19:45 +0000)
Changing the translation unit linkage order will break testUriScheme.
Use explicit subsystems initialization, like testURL already does.

src/tests/testUriScheme.cc
src/tests/testUriScheme.h

index 00e75ac992c27d2fb7c8c2ba4803b538f054f7eb..b58b6505b28f3752707a970efc84789ce0b9900d 100644 (file)
@@ -155,3 +155,9 @@ testUriScheme::testStream()
     CPPUNIT_ASSERT_EQUAL(http_str, from_buf);
 }
 
+void
+testUriScheme::setUp()
+{
+    Mem::Init();
+    AnyP::UriScheme::Init();
+}
index 1ca3afff4ae24d5bd4637914217c3056436ff00a..a324cdc8530180032fa19280b2c17aa488500c9d 100644 (file)
@@ -35,6 +35,7 @@ class testUriScheme : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
+    void setUp();
 
 protected:
     void testAssignFromprotocol_t();