void addTests() { this->test_music::addTests(); ADD_MUSIC_TEST(&test_dro_dosbox_v1::test_delay_combining); ADD_MUSIC_TEST(&test_dro_dosbox_v1::test_inst_read); ADD_MUSIC_TEST(&test_dro_dosbox_v1::test_perc_dupe); // c00: Normal this->isInstance(MusicType::DefinitelyYes, this->standard()); // c01: Wrong signature this->isInstance(MusicType::DefinitelyNo, STRING_WITH_NULLS( "DBRAWOPP" "\x00\x00\x01\x00" )); // c02: Wrong version this->isInstance(MusicType::DefinitelyNo, STRING_WITH_NULLS( "DBRAWOPL" "\x01\x00\x00\x00" )); // c03: Too short this->isInstance(MusicType::DefinitelyNo, STRING_WITH_NULLS( "DB" )); // c04: Short but valid file this->isInstance(MusicType::DefinitelyYes, STRING_WITH_NULLS( "DBRAWOPL" "\x00\x00\x01\x00" )); }
void addTests() { this->test_music::addTests(); ADD_MUSIC_TEST(&test_imf_idsoftware_type0::test_opl_volume); #warning TODO: need a tempo change with postdata to ensure the old/new tempo is supplied in the correct order // c00: Normal this->isInstance(MusicType::Certainty::DefinitelyYes, this->standard()); // c01: Too short this->isInstance(MusicType::Certainty::DefinitelyNo, STRING_WITH_NULLS( "\x00\x00" "\x00" )); // c02: Invalid register this->isInstance(MusicType::Certainty::DefinitelyNo, STRING_WITH_NULLS( "\x00\x00\x00\x00" "\xF9\x00\x00\x00" )); // c03: Delay too large this->isInstance(MusicType::Certainty::DefinitelyNo, STRING_WITH_NULLS( "\x00\x00\x00\x00" "\xBD\x20\x00\xF0" )); // c04: Type-0 file with nonzero length this->isInstance(MusicType::Certainty::DefinitelyNo, STRING_WITH_NULLS( "\x04\x00\x00\x00" "\x12\x34\x56\x78" )); // c05: Short but valid file this->isInstance(MusicType::Certainty::DefinitelyYes, STRING_WITH_NULLS( "\x00\x00\x00\x00" )); // c06: Truncated file this->isInstance(MusicType::Certainty::DefinitelyNo, STRING_WITH_NULLS( "\x00\x00\x00\x00" "\xBD\x20\x00" )); }
void addTests() { this->test_music::addTests(); ADD_MUSIC_TEST(&test_cdfm_zone66_gus::test_volume_to_velocity); // c00: Normal this->isInstance(MusicType::Certainty::DefinitelyYes, this->standard()); // c01: Sample data past EOF this->isInstance(MusicType::Certainty::DefinitelyNo, STRING_WITH_NULLS( "\x35\x01\x00\x00" "\xCC" "\x03" "\x02" "\x01" "\x01" "\x00\x00\x01" "\x00\x00\x00\x00" "\x0B\x00\x00\x00" "\x02\x00\x21\x00\x00\x00\x00\x10\x00\x00\x00" // Pattern 0 "\x40\x23\x0F\x00\x01\x01\x00\x01\x80\x00\x02" // Pattern 1 "\x40\x23\x0F\x00\x01\x01\x00\x01\x80\x00\x02" // PCM inst 1 sample data "\x00\x10\x00\xF0\x00\x10\x00\xF0\x00\x10\x00\xF0\x00\x10\x00\xF0" )); // c02: Loop target is past end of song this->isInstance(MusicType::Certainty::DefinitelyNo, STRING_WITH_NULLS( "\x35\x00\x00\x00" "\xCC" "\x03" "\x02" "\x01" "\x0F" "\x00\x00\x01" "\x00\x00\x00\x00" "\x0B\x00\x00\x00" "\x02\x00\x21\x00\x00\x00\x00\x10\x00\x00\x00" // Pattern 0 "\x40\x23\x0F\x00\x01\x01\x00\x01\x80\x00\x02" // Pattern 1 "\x40\x23\x0F\x00\x01\x01\x00\x01\x80\x00\x02" // PCM inst 1 sample data "\x00\x10\x00\xF0\x00\x10\x00\xF0\x00\x10\x00\xF0\x00\x10\x00\xF0" )); // c03: Sequence specifies invalid pattern this->isInstance(MusicType::Certainty::DefinitelyNo, STRING_WITH_NULLS( "\x35\x00\x00\x00" "\xCC" "\x03" "\x02" "\x01" "\x01" "\x00\x0F\x01" "\x00\x00\x00\x00" "\x0B\x00\x00\x00" "\x02\x00\x21\x00\x00\x00\x00\x10\x00\x00\x00" // Pattern 0 "\x40\x23\x0F\x00\x01\x01\x00\x01\x80\x00\x02" // Pattern 1 "\x40\x23\x0F\x00\x01\x01\x00\x01\x80\x00\x02" // PCM inst 1 sample data "\x00\x10\x00\xF0\x00\x10\x00\xF0\x00\x10\x00\xF0\x00\x10\x00\xF0" )); // c04: Pattern data offset is past EOF this->isInstance(MusicType::Certainty::DefinitelyNo, STRING_WITH_NULLS( "\x35\x00\x00\x00" "\xCC" "\x03" "\x02" "\x01" "\x01" "\x00\x00\x01" "\x00\x00\x00\x00" "\xFF\x00\x00\x00" "\x02\x00\x21\x00\x00\x00\x00\x10\x00\x00\x00" // Pattern 0 "\x40\x23\x0F\x00\x01\x01\x00\x01\x80\x00\x02" // Pattern 1 "\x40\x23\x0F\x00\x01\x01\x00\x01\x80\x00\x02" // PCM inst 1 sample data "\x00\x10\x00\xF0\x00\x10\x00\xF0\x00\x10\x00\xF0\x00\x10\x00\xF0" )); }