From 188b94cb3e2d6257ad5545160563a7c94a0bc291 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 24 Oct 2014 20:30:48 +0200 Subject: test/test_archive: don't use GLib --- test/test_archive.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/test_archive.cxx b/test/test_archive.cxx index 353699574..1b15e306f 100644 --- a/test/test_archive.cxx +++ b/test/test_archive.cxx @@ -7,8 +7,6 @@ #include #include -#include - #include #include @@ -29,22 +27,22 @@ ArchiveLookupTest::TestArchiveLookup() char *path = strdup(""); CPPUNIT_ASSERT_EQUAL(false, archive_lookup(path, &archive, &inpath, &suffix)); - g_free(path); + free(path); path = strdup("."); CPPUNIT_ASSERT_EQUAL(false, archive_lookup(path, &archive, &inpath, &suffix)); - g_free(path); + free(path); path = strdup("config.h"); CPPUNIT_ASSERT_EQUAL(false, archive_lookup(path, &archive, &inpath, &suffix)); - g_free(path); + free(path); path = strdup("src/foo/bar"); CPPUNIT_ASSERT_EQUAL(false, archive_lookup(path, &archive, &inpath, &suffix)); - g_free(path); + free(path); path = strdup("Makefile/foo/bar"); CPPUNIT_ASSERT_EQUAL(true, @@ -53,7 +51,7 @@ ArchiveLookupTest::TestArchiveLookup() CPPUNIT_ASSERT_EQUAL(0, strcmp(archive, "Makefile")); CPPUNIT_ASSERT_EQUAL(0, strcmp(inpath, "foo/bar")); CPPUNIT_ASSERT_EQUAL((const char *)nullptr, suffix); - g_free(path); + free(path); path = strdup("config.h/foo/bar"); CPPUNIT_ASSERT_EQUAL(true, @@ -62,7 +60,7 @@ ArchiveLookupTest::TestArchiveLookup() CPPUNIT_ASSERT_EQUAL(0, strcmp(archive, "config.h")); CPPUNIT_ASSERT_EQUAL(0, strcmp(inpath, "foo/bar")); CPPUNIT_ASSERT_EQUAL(0, strcmp(suffix, "h")); - g_free(path); + free(path); } CPPUNIT_TEST_SUITE_REGISTRATION(ArchiveLookupTest); -- cgit v1.2.3