From 098e68519395a8316d6be60589e06383571a1a3d Mon Sep 17 00:00:00 2001 From: "Stephen F. Booth" Date: Fri, 17 May 2024 07:28:39 -0500 Subject: [PATCH] Add a simple tag writing test --- tests/test_mp4.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_mp4.cpp b/tests/test_mp4.cpp index e5b4ece6..ea4a8d0a 100644 --- a/tests/test_mp4.cpp +++ b/tests/test_mp4.cpp @@ -857,6 +857,14 @@ public: CPPUNIT_ASSERT(f.isValid()); CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->channels()); CPPUNIT_ASSERT_EQUAL(32000, f.audioProperties()->sampleRate()); + f.tag()->setTitle("TITLE"); + f.save(); + } + { + MP4::File f(copy.fileName().c_str()); + CPPUNIT_ASSERT(f.isValid()); + CPPUNIT_ASSERT(f.hasMP4Tag()); + CPPUNIT_ASSERT_EQUAL(String("TITLE"), f.tag()->title()); } } };