| 31 | } |
| 32 | |
| 33 | void OnTestFinish() override { |
| 34 | // Cleanup Test |
| 35 | KillAllUnits(); |
| 36 | |
| 37 | // Validate Result |
| 38 | FeatureLayer8BPP data; |
| 39 | const char* error = GetPlayerRelativeLayer(agent_, FeatureLayerType::MINIMAP, data); |
| 40 | if (error) { |
| 41 | ReportError(error); |
| 42 | return; |
| 43 | } |
| 44 | |
| 45 | bool foundUnit = false; |
| 46 | for (int x = 0; x < data.width; ++x) { |
| 47 | for (int y = 0; y < data.height; ++y) { |
| 48 | char value = data.Read(Point2DI(x, y)); |
| 49 | if (value > 0) { |
| 50 | foundUnit = true; |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | if (!foundUnit) |
| 56 | ReportError("Unit not found in feature layer"); |
| 57 | } |
| 58 | }; |
| 59 | |
| 60 |
nothing calls this directly
no test coverage detected