Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

test(gameengine): drop factory checks that are not in this tree

Olcay Seygan863ddac99f9b
diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cpp
index 93e1af79d..f780dee85 100644
--- a/GeneralsMD/Code/Tests/test_gameengine.cpp
+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp
@@ -10080,43 +10080,6 @@ TEST(massing_waits_for_a_force_but_never_waits_for_ever)
}
-/** Another factory when the queue is backing up, and another tech building until three are standing.
- Easy and Normal never reach the caller: economy buildings stay off below Brutal. */
-TEST(extra_factory_follows_the_queue_and_tech_stops_at_three)
-{
- // nothing left standing: put one back
- CHECK( aiWantsAnotherFactory( 0, 0, 0, 0, FALSE ) );
-
- // one already going up is the building this would ask for
- CHECK( !aiWantsAnotherFactory( 0, 1, 0, 0, FALSE ) );
- CHECK( !aiWantsAnotherFactory( 2, 1, 0, 4, FALSE ) );
-
- // a factory with an empty queue is the spare
- CHECK( !aiWantsAnotherFactory( 2, 0, 1, 3, FALSE ) );
-
- // every finished factory is busy, and a unit is waiting behind the one being built
- CHECK( aiWantsAnotherFactory( 2, 0, 0, 2, FALSE ) );
-
- // busy, but the queue is only the unit under construction
- CHECK( !aiWantsAnotherFactory( 1, 0, 0, 1, FALSE ) );
-
- // airfields and the income buildings: another whenever one is not already going up,
- // even while a finished one sits idle
- CHECK( aiWantsAnotherFactory( 3, 0, 2, 0, TRUE ) );
- CHECK( !aiWantsAnotherFactory( 3, 1, 0, 5, TRUE ) );
-
- CHECK( aiWantsAnotherTechBuilding( 0, 0 ) );
- CHECK( aiWantsAnotherTechBuilding( AI_TECH_BUILDING_COPIES - 1, 0 ) );
- CHECK( !aiWantsAnotherTechBuilding( 2, 1 ) );
- CHECK( !aiWantsAnotherTechBuilding( AI_TECH_BUILDING_COPIES, 0 ) );
-
- TAiData ladder;
- CHECK( !ladder.m_skill[ AISKILL_EASY ].m_economyBuildings );
- CHECK( !ladder.m_skill[ AISKILL_MEDIUM ].m_economyBuildings );
- CHECK( ladder.m_skill[ AISKILL_BRUTAL ].m_economyBuildings );
-}
-
-
/** B2: which enemy to go after. EA's answer was the nearest one, plus a rule with the sign the
wrong way round - an enemy who had lost his units or his production had his distance set to half
the map, which is "ignore the one you are about to beat" and is what drags matches out. */