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

Function testPanAbs

tests/game_player_pan.cpp:12–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10TEST_SUITE_BEGIN("Game_Player");
11
12static void testPanAbs(Game_Player& ch, bool active, bool locked, int dx, int dy, int dtx, int dty, int w) {
13 CAPTURE(active);
14 CAPTURE(locked);
15 CAPTURE(dx);
16 CAPTURE(dy);
17 CAPTURE(dtx);
18 CAPTURE(dty);
19 CAPTURE(w);
20
21 REQUIRE_EQ(ch.IsPanActive(), active);
22 REQUIRE_EQ(ch.IsPanLocked(), locked);
23 REQUIRE_EQ(ch.GetPanX(), lcf::rpg::SavePartyLocation::kPanXDefault + dx);
24 REQUIRE_EQ(ch.GetPanY(), lcf::rpg::SavePartyLocation::kPanYDefault + dy);
25 REQUIRE_EQ(ch.GetTargetPanX(), lcf::rpg::SavePartyLocation::kPanXDefault + dtx);
26 REQUIRE_EQ(ch.GetTargetPanY(), lcf::rpg::SavePartyLocation::kPanYDefault + dty);
27 REQUIRE_EQ(ch.GetPanWait(), w);
28}
29
30static void testPan(Game_Player& ch, bool active, bool locked, int dx, int dy, int dtx, int dty, int w) {
31 testPanAbs(ch, active, locked, dx * SCREEN_TILE_SIZE, dy * SCREEN_TILE_SIZE, dtx * SCREEN_TILE_SIZE, dty * SCREEN_TILE_SIZE, w);

Callers 3

testPanFunction · 0.85
testAnimPanFunction · 0.85
testAnimBlockedFunction · 0.85

Calls 7

IsPanActiveMethod · 0.80
IsPanLockedMethod · 0.80
GetTargetPanXMethod · 0.80
GetTargetPanYMethod · 0.80
GetPanWaitMethod · 0.80
GetPanXMethod · 0.45
GetPanYMethod · 0.45

Tested by

no test coverage detected