コード例 #1
0
ファイル: test_mod.cpp プロジェクト: DiodeZ/taglib
  void testRead(FileName fileName, const String &title, const String &comment)
  {
    Mod::File file(fileName);

    CPPUNIT_ASSERT(file.isValid());

    Mod::Properties *p = file.audioProperties();
    Mod::Tag *t = file.tag();

    CPPUNIT_ASSERT(0 != p);
    CPPUNIT_ASSERT(0 != t);

    CPPUNIT_ASSERT_EQUAL(0, p->length());
    CPPUNIT_ASSERT_EQUAL(0, p->bitrate());
    CPPUNIT_ASSERT_EQUAL(0, p->sampleRate());
    CPPUNIT_ASSERT_EQUAL(8, p->channels());
    CPPUNIT_ASSERT_EQUAL(31U, p->instrumentCount());
    CPPUNIT_ASSERT_EQUAL((unsigned char)1, p->lengthInPatterns());
    CPPUNIT_ASSERT_EQUAL(title, t->title());
    CPPUNIT_ASSERT_EQUAL(String(), t->artist());
    CPPUNIT_ASSERT_EQUAL(String(), t->album());
    CPPUNIT_ASSERT_EQUAL(comment, t->comment());
    CPPUNIT_ASSERT_EQUAL(String(), t->genre());
    CPPUNIT_ASSERT_EQUAL(0U, t->year());
    CPPUNIT_ASSERT_EQUAL(0U, t->track());
    CPPUNIT_ASSERT_EQUAL(String("StarTrekker"), t->trackerName());
  }
コード例 #2
0
ファイル: test_it.cpp プロジェクト: Linko91/node-taglib2
  void testRead(FileName fileName, const String &title, const String &comment)
  {
    IT::File file(fileName);

    CPPUNIT_ASSERT(file.isValid());

    IT::AudioProperties *p = file.audioProperties();
    Mod::Tag *t = file.tag();

    CPPUNIT_ASSERT(0 != p);
    CPPUNIT_ASSERT(0 != t);

    CPPUNIT_ASSERT_EQUAL( 0, p->length());
    CPPUNIT_ASSERT_EQUAL( 0, p->bitrate());
    CPPUNIT_ASSERT_EQUAL( 0, p->sampleRate());
    CPPUNIT_ASSERT_EQUAL(64, p->channels());
    CPPUNIT_ASSERT_EQUAL((unsigned short)  0, p->lengthInPatterns());
    CPPUNIT_ASSERT_EQUAL(true, p->stereo());
    CPPUNIT_ASSERT_EQUAL((unsigned short)  0, p->instrumentCount());
    CPPUNIT_ASSERT_EQUAL((unsigned short)  5, p->sampleCount());
    CPPUNIT_ASSERT_EQUAL((unsigned short)  1, p->patternCount());
    CPPUNIT_ASSERT_EQUAL((unsigned short)535, p->version());
    CPPUNIT_ASSERT_EQUAL((unsigned short)532, p->compatibleVersion());
    CPPUNIT_ASSERT_EQUAL((unsigned short)  9, p->flags());
    CPPUNIT_ASSERT_EQUAL((unsigned char)128, p->globalVolume());
    CPPUNIT_ASSERT_EQUAL((unsigned char) 48, p->mixVolume());
    CPPUNIT_ASSERT_EQUAL((unsigned char)125, p->tempo());
    CPPUNIT_ASSERT_EQUAL((unsigned char)  6, p->bpmSpeed());
    CPPUNIT_ASSERT_EQUAL((unsigned char)128, p->panningSeparation());
    CPPUNIT_ASSERT_EQUAL((unsigned char)  0, p->pitchWheelDepth());
    CPPUNIT_ASSERT_EQUAL(title, t->title());
    CPPUNIT_ASSERT_EQUAL(String(), t->artist());
    CPPUNIT_ASSERT_EQUAL(String(), t->album());
    CPPUNIT_ASSERT_EQUAL(comment, t->comment());
    CPPUNIT_ASSERT_EQUAL(String(), t->genre());
    CPPUNIT_ASSERT_EQUAL(0U, t->year());
    CPPUNIT_ASSERT_EQUAL(0U, t->track());
    CPPUNIT_ASSERT_EQUAL(String("Impulse Tracker"), t->trackerName());
  }
コード例 #3
0
ファイル: test_s3m.cpp プロジェクト: ArnaudBienner/taglib
  void testRead(FileName fileName, const String &title, const String &comment)
  {
    S3M::File file(fileName);

    CPPUNIT_ASSERT(file.isValid());

    S3M::Properties *p = file.audioProperties();
    Mod::Tag *t = file.tag();

    CPPUNIT_ASSERT(0 != p);
    CPPUNIT_ASSERT(0 != t);

    CPPUNIT_ASSERT_EQUAL( 0, p->length());
    CPPUNIT_ASSERT_EQUAL( 0, p->bitrate());
    CPPUNIT_ASSERT_EQUAL( 0, p->sampleRate());
    CPPUNIT_ASSERT_EQUAL(16, p->channels());
    CPPUNIT_ASSERT_EQUAL((unsigned short)   0, p->lengthInPatterns());
    CPPUNIT_ASSERT_EQUAL(false, p->stereo());
    CPPUNIT_ASSERT_EQUAL((unsigned short)   5, p->sampleCount());
    CPPUNIT_ASSERT_EQUAL((unsigned short)   1, p->patternCount());
    CPPUNIT_ASSERT_EQUAL((unsigned short)   0, p->flags());
    CPPUNIT_ASSERT_EQUAL((unsigned short)4896, p->trackerVersion());
    CPPUNIT_ASSERT_EQUAL((unsigned short)   2, p->fileFormatVersion());
    CPPUNIT_ASSERT_EQUAL((unsigned char) 64, p->globalVolume());
    CPPUNIT_ASSERT_EQUAL((unsigned char) 48, p->masterVolume());
    CPPUNIT_ASSERT_EQUAL((unsigned char)125, p->tempo());
    CPPUNIT_ASSERT_EQUAL((unsigned char)  6, p->bpmSpeed());
    CPPUNIT_ASSERT_EQUAL(title, t->title());
    CPPUNIT_ASSERT_EQUAL(String(), t->artist());
    CPPUNIT_ASSERT_EQUAL(String(), t->album());
    CPPUNIT_ASSERT_EQUAL(comment, t->comment());
    CPPUNIT_ASSERT_EQUAL(String(), t->genre());
    CPPUNIT_ASSERT_EQUAL(0U, t->year());
    CPPUNIT_ASSERT_EQUAL(0U, t->track());
    CPPUNIT_ASSERT_EQUAL(String("ScreamTracker III"), t->trackerName());
  }