| 82 | } |
| 83 | |
| 84 | void TestUnitCommand::VerifyUnitOrders(Tag unit_tag, ABILITY_ID test_ability) { |
| 85 | bool order_found = false; |
| 86 | |
| 87 | const ObservationInterface* obs = agent_->Observation(); |
| 88 | if (!obs) { |
| 89 | return; |
| 90 | } |
| 91 | |
| 92 | const Unit* unit = obs->GetUnit(unit_tag); |
| 93 | if (!unit) { |
| 94 | return; |
| 95 | } |
| 96 | |
| 97 | for (UnitOrder order : unit->orders) { |
| 98 | if (order.ability_id == test_ability) { |
| 99 | order_found = true; |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | if (!order_found) { |
| 104 | ReportError("Expected order not in unit orders"); |
| 105 | } |
| 106 | |
| 107 | orders_verified_ = true; |
| 108 | } |
| 109 | |
| 110 | void TestUnitCommand::VerifyUnitExistsAndComplete(UNIT_TYPEID unit_type, bool verify_complete) { |
| 111 | bool unit_exists = false; |
nothing calls this directly
no test coverage detected