summaryrefslogtreecommitdiff
path: root/test/test_icy_parser.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-20 14:49:48 +0100
committerMax Kellermann <max@musicpd.org>2017-12-20 14:55:25 +0100
commitcb3042ffb206132e7cac5ee5f52b71d1e0f8ca05 (patch)
tree042981840605509538e64f6c2bb4c3ba0798730e /test/test_icy_parser.cxx
parentd293aaf94539338c331f77ae0d153df6eeb99f7b (diff)
tag/Builder: CommitNew() returns std::unique_ptr<Tag>
Diffstat (limited to 'test/test_icy_parser.cxx')
-rw-r--r--test/test_icy_parser.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/test_icy_parser.cxx b/test/test_icy_parser.cxx
index 59390b3bd..c213f9656 100644
--- a/test/test_icy_parser.cxx
+++ b/test/test_icy_parser.cxx
@@ -17,7 +17,7 @@
#include <string.h>
-static Tag *
+static std::unique_ptr<Tag>
icy_parse_tag(const char *p)
{
char *q = strdup(p);
@@ -38,17 +38,15 @@ CompareTagTitle(const Tag &tag, const std::string &title)
static void
TestIcyParserTitle(const char *input, const char *title)
{
- Tag *tag = icy_parse_tag(input);
+ const auto tag = icy_parse_tag(input);
CompareTagTitle(*tag, title);
- delete tag;
}
static void
TestIcyParserEmpty(const char *input)
{
- Tag *tag = icy_parse_tag(input);
+ const auto tag = icy_parse_tag(input);
CPPUNIT_ASSERT_EQUAL(uint16_t(0), tag->num_items);
- delete tag;
}
class IcyTest : public CppUnit::TestFixture {