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

Function testDecision

tests/game_player_input.cpp:102–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102static void testDecision(bool moved, int vehicle, bool boarding, bool aboard) {
103 auto& ch = *MockGame::GetPlayer();
104
105 ch.SetX(8);
106 ch.SetY(8);
107
108 Input::ResetKeys();
109
110 Input::triggered[Input::DECISION] = true;
111
112 ForceUpdate(ch);
113
114 int y = moved ? 9 : 8;
115 int rs = moved ? 224 : 0;
116 int stp = moved ? 0 : 1;
117 testPos(ch, 8, y, Down, Down, rs, false, stp, 0, 0, false, false, vehicle, boarding, aboard);
118}
119
120TEST_CASE("DecisionNone") {
121 const MockGame mg(map_id);

Callers 1

Calls 4

testPosFunction · 0.85
ForceUpdateFunction · 0.70
SetXMethod · 0.45
SetYMethod · 0.45

Tested by

no test coverage detected