diff --git a/tests/BattleTests/CloneTests.cpp b/tests/BattleTests/CloneTests.cpp index 363ffea..ceca902 100644 --- a/tests/BattleTests/CloneTests.cpp +++ b/tests/BattleTests/CloneTests.cpp @@ -35,15 +35,23 @@ TEST_CASE("Clone battle, test basic functionality") { TEST_CASE("Clone battle, test history history holder") { auto lib = TestLibrary::Get(); auto battle = Battle(lib, {}); - auto side = BattleSide(0, &battle, 1); - auto c = CreateCreature(TestLibrary::Get(), "testSpecies1"_cnc, 5).Create(); - side.SetCreature(c, 0); - auto clone = battle.Clone(); + clone->RegisterHistoryElement(nullptr); clone->RegisterHistoryElement(nullptr); - delete c; + delete clone; +} + +TEST_CASE("Clone battle, test randomness") { + auto lib = TestLibrary::Get(); + auto battle = Battle(lib, {}); + auto clone = battle.Clone(); + + REQUIRE_EQ(battle.GetRandom()->Get(), clone->GetRandom()->Get()); + REQUIRE_EQ(battle.GetRandom()->Get(), clone->GetRandom()->Get()); + REQUIRE_EQ(battle.GetRandom()->Get(), clone->GetRandom()->Get()); + delete clone; }