MCPcopy Create free account
hub / github.com/EasyRPG/Player / testActionNullptr

Function testActionNullptr

tests/enemyai.cpp:262–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262static void testActionNullptr(int start, int end, Game_Enemy& source) {
263 for (int rng = start; rng < end; ++rng) {
264 CAPTURE(rng);
265 bool bugs = true;
266 CAPTURE(bugs);
267
268 Rand::LockGuard lk(rng);
269 bugs = true;
270 source.SetBattleAlgorithm(nullptr);
271 EnemyAi::SelectEnemyAiActionRpgRtCompat(source, bugs);
272 REQUIRE_FALSE(source.GetBattleAlgorithm());
273
274 bugs = false;
275 source.SetBattleAlgorithm(nullptr);
276 EnemyAi::SelectEnemyAiActionRpgRtCompat(source, bugs);
277 REQUIRE_FALSE(source.GetBattleAlgorithm());
278 }
279}
280
281TEST_CASE("Ratings") {
282 const MockActor m;

Callers 1

enemyai.cppFile · 0.85

Calls 3

SetBattleAlgorithmMethod · 0.80
GetBattleAlgorithmMethod · 0.80

Tested by

no test coverage detected