aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_archive.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 00:35:58 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 00:36:52 +0200
commit1b8a1d4140c58030bc71665eef4dc3485812817e (patch)
treef463333b71117b2c64d3845e70c3a123d6607b80 /test/test_archive.cxx
parente132d10aec524962c5b5cbe135930aaabccba810 (diff)
downloadmpd-1b8a1d4140c58030bc71665eef4dc3485812817e.tar.gz
mpd-1b8a1d4140c58030bc71665eef4dc3485812817e.tar.xz
mpd-1b8a1d4140c58030bc71665eef4dc3485812817e.zip
ArchiveLookup: return const strings
Diffstat (limited to 'test/test_archive.cxx')
-rw-r--r--test/test_archive.cxx8
1 files changed, 4 insertions, 4 deletions
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"));