Skip to content

Commit

Permalink
Add test for OpenEnroth#1515 and OpenEnroth#1524
Browse files Browse the repository at this point in the history
  • Loading branch information
pskelton committed Mar 17, 2024
1 parent d64bd5c commit d69e043
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Media/Audio/SoundEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ enum class SoundId : int16_t {
SOUND_Bless = 14010,
SOUND_Fate = 14020,
SOUND_51heroism03 = 14060,
SOUND_RechargeItem = 17020,
SOUND_94dayofprotection03 = 17070,
SOUND_9armageddon01 = 17080,
SOUND_Sacrifice2 = 18060,
Expand Down
2 changes: 1 addition & 1 deletion test/Bin/GameTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if(OE_BUILD_TESTS)
ExternalProject_Add(OpenEnroth_TestData
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/test_data_tmp
GIT_REPOSITORY https://github.com/OpenEnroth/OpenEnroth_TestData.git
GIT_TAG 9ee096523cabd460111483c6adf51654cef7c087
GIT_TAG c4d5e3c0368158daeca851182134f3feba92ac0b
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/test_data
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
Expand Down
14 changes: 14 additions & 0 deletions test/Bin/GameTest/GameTests_1500.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ GAME_TEST(Issues, Issue1510) {
EXPECT_LE(actorDistTape.max(), meleeRange);
}

GAME_TEST(Issues, Issue1515) {
// No dispel magic sound
auto soundsTape = tapes.sounds();
test.playTraceFromTestData("issue_1515.mm7", "issue_1515.json");
EXPECT_TRUE(soundsTape.flattened().contains(SOUND_RechargeItem)); // dispel magic
}

GAME_TEST(Issues, Issue1515_1524) {
// More enemy spells without sound
auto soundsTape = tapes.sounds();
test.playTraceFromTestData("issue_1524.mm7", "issue_1524.json");
EXPECT_TRUE(soundsTape.flattened().contains(SOUND_Sacrifice2)); // pain reflection sound
}

GAME_TEST(Issues, Issue1535) {
// Queued messages stay in the event queue and roll over between tests.
game.startNewGame();
Expand Down

0 comments on commit d69e043

Please sign in to comment.