Skip to content

Commit

Permalink
Merge pull request OpenEnroth#1903 from pskelton/issues
Browse files Browse the repository at this point in the history
Add test for OpenEnroth#1869
  • Loading branch information
pskelton authored Dec 16, 2024
2 parents 76151cb + 11d9969 commit 73e68f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/Bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
ExternalProject_Add(OpenEnroth_TestData
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/test_data_tmp
GIT_REPOSITORY https://github.com/OpenEnroth/OpenEnroth_TestData.git
GIT_TAG 7677eec39a84d5833268eb0b91dbdac777127cf0
GIT_TAG c7806b37639ab428bc51ab401ecf38294d84fac8
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/test_data
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
Expand Down
9 changes: 9 additions & 0 deletions test/Bin/GameTest/GameTests_1500.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,21 @@ GAME_TEST(Issues, Issue1837) {
EXPECT_FLOAT_EQ(pParty->pos.z, 1.0f);
}

GAME_TEST(Issues, Issue1869) {
// Face overflow in Tunnels to Eeofol
auto faceCount = tapes.custom([]() { return pBspRenderer->num_faces; });
test.playTraceFromTestData("issue_1869.mm7", "issue_1869.json");
EXPECT_EQ(engine->_currentLoadedMapId, MAP_TUNNELS_TO_EEOFOL);
EXPECT_LT(faceCount.max(), 1400);
}

GAME_TEST(Issues, Issue1898) {
// Doors in School of Sorcery hurt all party members instead of the active one
auto totalHealth = tapes.totalHp();
auto charHealth = charTapes.hp(0);
test.playTraceFromTestData("issue_1898.mm7", "issue_1898.json");
EXPECT_EQ(engine->_currentLoadedMapId, MAP_SCHOOL_OF_SORCERY);
EXPECT_LT(totalHealth.delta(), 0);
EXPECT_EQ(charHealth.delta(), totalHealth.delta()); // all health lost from one character
}

Expand Down

0 comments on commit 73e68f7

Please sign in to comment.