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

Function testMoveRoute

tests/move_route.cpp:34–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34static void testMoveRoute(
35 const Game_Character& ch,
36 bool paused, int move_frequency,
37 int stop_count, int max_stop_count,
38 int move_route_idx, bool overwritten, bool done,
39 const lcf::rpg::MoveRoute& mr)
40{
41 CAPTURE(paused);
42 CAPTURE(move_frequency);
43 CAPTURE(stop_count);
44 CAPTURE(max_stop_count);
45 CAPTURE(move_route_idx);
46 CAPTURE(overwritten);
47 CAPTURE(done);
48 CAPTURE(mr);
49
50 REQUIRE_EQ(ch.IsPaused(), paused);
51 REQUIRE_EQ(ch.GetMoveFrequency(), move_frequency);
52 REQUIRE_EQ(ch.GetStopCount(), stop_count);
53 REQUIRE_EQ(ch.GetMaxStopCount(), max_stop_count);
54 REQUIRE_EQ(ch.GetMoveRouteIndex(), move_route_idx);
55 REQUIRE_EQ(ch.IsMoveRouteOverwritten(), overwritten);
56 REQUIRE_EQ(ch.IsMoveRouteFinished(), done);
57 REQUIRE_EQ(ch.GetMoveRoute(), mr);
58 REQUIRE_EQ(ch.IsStopCountActive(), stop_count < max_stop_count);
59}
60
61template <typename... Args>
62static void testMoveRouteDir(const Game_Character& ch,

Callers 4

testMoveRouteDirFunction · 0.85
move_route.cppFile · 0.85
testInvalidCmdFunction · 0.85
testLockFacingFunction · 0.85

Calls 8

GetMoveFrequencyMethod · 0.80
GetStopCountMethod · 0.80
GetMaxStopCountMethod · 0.80
GetMoveRouteIndexMethod · 0.80
IsMoveRouteFinishedMethod · 0.80
IsStopCountActiveMethod · 0.80
IsPausedMethod · 0.45

Tested by

no test coverage detected