mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
FileRef: Allow an IOStream to be used
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include <vorbisfile.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include "utils.h"
|
||||
#include <tfilestream.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace TagLib;
|
||||
@ -74,6 +75,17 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(f->tag()->track(), TagLib::uint(7));
|
||||
CPPUNIT_ASSERT_EQUAL(f->tag()->year(), TagLib::uint(2080));
|
||||
delete f;
|
||||
|
||||
FileStream fs(newname.c_str());
|
||||
f = new FileRef(&fs);
|
||||
CPPUNIT_ASSERT(!f->isNull());
|
||||
CPPUNIT_ASSERT_EQUAL(f->tag()->artist(), String("ttest artist"));
|
||||
CPPUNIT_ASSERT_EQUAL(f->tag()->title(), String("ytest title"));
|
||||
CPPUNIT_ASSERT_EQUAL(f->tag()->genre(), String("uTest!"));
|
||||
CPPUNIT_ASSERT_EQUAL(f->tag()->album(), String("ialbummmm"));
|
||||
CPPUNIT_ASSERT_EQUAL(f->tag()->track(), TagLib::uint(7));
|
||||
CPPUNIT_ASSERT_EQUAL(f->tag()->year(), TagLib::uint(2080));
|
||||
delete f;
|
||||
}
|
||||
|
||||
void testMusepack()
|
||||
|
Reference in New Issue
Block a user