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

Function testMoveRouteMove

tests/move_route.cpp:75–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74template <typename... Args>
75static void testMoveRouteMove(const Game_Character& ch,
76 int x, int y, int remaining_step,
77 Args&&... args) {
78
79 CAPTURE(x);
80 CAPTURE(y);
81 CAPTURE(remaining_step);
82
83 REQUIRE_EQ(ch.GetX(), x);
84 REQUIRE_EQ(ch.GetY(), y);
85 REQUIRE_GE(ch.GetRemainingStep(), 0);
86 REQUIRE_EQ(ch.GetRemainingStep(), remaining_step);
87 REQUIRE(!ch.IsJumping());
88 if (remaining_step > 0) {
89 REQUIRE(ch.IsMoving());
90 } else {
91 REQUIRE(ch.IsStopping());
92 REQUIRE(!ch.IsMoving());
93 }
94 testMoveRouteDir(ch, std::forward<Args>(args)...);
95}
96
97template <typename... Args>
98static void testMoveRouteJump(const Game_Character& ch,

Callers 2

testMoveFunction · 0.85
testJumpFunction · 0.85

Calls 7

testMoveRouteDirFunction · 0.85
GetRemainingStepMethod · 0.80
IsJumpingMethod · 0.80
IsMovingMethod · 0.80
IsStoppingMethod · 0.80
GetXMethod · 0.45
GetYMethod · 0.45

Tested by

no test coverage detected