From 1b8a1d4140c58030bc71665eef4dc3485812817e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 17 Oct 2013 00:35:58 +0200 Subject: ArchiveLookup: return const strings --- test/test_archive.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/test_archive.cxx b/test/test_archive.cxx index 2a2952885..e16b49061 100644 --- a/test/test_archive.cxx +++ b/test/test_archive.cxx @@ -23,7 +23,7 @@ public: void ArchiveLookupTest::TestArchiveLookup() { - char *archive, *inpath, *suffix; + const char *archive, *inpath, *suffix; char *path = strdup(""); CPPUNIT_ASSERT_EQUAL(false, @@ -48,16 +48,16 @@ ArchiveLookupTest::TestArchiveLookup() path = strdup("Makefile/foo/bar"); CPPUNIT_ASSERT_EQUAL(true, archive_lookup(path, &archive, &inpath, &suffix)); - CPPUNIT_ASSERT_EQUAL(path, archive); + CPPUNIT_ASSERT_EQUAL((const char *)path, archive); CPPUNIT_ASSERT_EQUAL(0, strcmp(archive, "Makefile")); CPPUNIT_ASSERT_EQUAL(0, strcmp(inpath, "foo/bar")); - CPPUNIT_ASSERT_EQUAL((char *)nullptr, suffix); + CPPUNIT_ASSERT_EQUAL((const char *)nullptr, suffix); g_free(path); path = strdup("config.h/foo/bar"); CPPUNIT_ASSERT_EQUAL(true, archive_lookup(path, &archive, &inpath, &suffix)); - CPPUNIT_ASSERT_EQUAL(path, archive); + CPPUNIT_ASSERT_EQUAL((const char *)path, archive); CPPUNIT_ASSERT_EQUAL(0, strcmp(archive, "config.h")); CPPUNIT_ASSERT_EQUAL(0, strcmp(inpath, "foo/bar")); CPPUNIT_ASSERT_EQUAL(0, strcmp(suffix, "h")); -- cgit v1.2.3