| 1801 | // |
| 1802 | |
| 1803 | bool TestUnitCommand(int argc, char** argv) { |
| 1804 | Coordinator coordinator; |
| 1805 | if (!coordinator.LoadSettings(argc, argv)) { |
| 1806 | return false; |
| 1807 | } |
| 1808 | |
| 1809 | // Add the custom bot, it will control the players. |
| 1810 | UnitCommandTestBot bot; |
| 1811 | |
| 1812 | coordinator.SetParticipants({ |
| 1813 | CreateParticipant(sc2::Race::Terran, &bot), |
| 1814 | }); |
| 1815 | |
| 1816 | // Start the game. |
| 1817 | coordinator.LaunchStarcraft(); |
| 1818 | coordinator.StartGame(sc2::kMapEmpty); |
| 1819 | |
| 1820 | // Step forward the game simulation. |
| 1821 | while (!bot.IsFinished()) { |
| 1822 | coordinator.Update(); |
| 1823 | } |
| 1824 | |
| 1825 | return bot.Success(); |
| 1826 | } |
| 1827 | |
| 1828 | } |
| 1829 |
nothing calls this directly
no test coverage detected