| 80 | TEST_SUITE_BEGIN("Game_Character"); |
| 81 | |
| 82 | static void testInit(Game_Character& ch, int max_stop_count = 0) { |
| 83 | REQUIRE_EQ(ch.GetX(), 0); |
| 84 | REQUIRE_EQ(ch.GetY(), 0); |
| 85 | REQUIRE_EQ(ch.GetMapId(), 0); |
| 86 | REQUIRE(!ch.IsFacingLocked()); |
| 87 | REQUIRE(!ch.IsOverlapForbidden()); |
| 88 | |
| 89 | // FIXME: Check move route |
| 90 | REQUIRE_EQ(ch.GetMoveRouteIndex(), 0); |
| 91 | REQUIRE(!ch.IsMoveRouteOverwritten()); |
| 92 | REQUIRE(!ch.IsMoveRouteFinished()); |
| 93 | REQUIRE_EQ(ch.GetSpriteName(), ""); |
| 94 | REQUIRE(ch.HasTileSprite()); |
| 95 | REQUIRE_EQ(ch.GetSpriteIndex(), 0); |
| 96 | REQUIRE_EQ(ch.GetAnimFrame(), 1); |
| 97 | REQUIRE(!ch.IsAnimPaused()); |
| 98 | REQUIRE_EQ(ch.GetFlashColor(), Color()); |
| 99 | REQUIRE_EQ(ch.GetFlashLevel(), 0.0); |
| 100 | REQUIRE_EQ(ch.GetFlashTimeLeft(), 0); |
| 101 | REQUIRE_EQ(ch.GetStopCount(), 0); |
| 102 | REQUIRE_EQ(ch.GetMaxStopCount(), max_stop_count); |
| 103 | REQUIRE_EQ(ch.IsStopCountActive(), (max_stop_count != 0)); |
| 104 | REQUIRE_EQ(ch.GetAnimCount(), 0); |
| 105 | REQUIRE(!ch.IsMoving()); |
| 106 | REQUIRE(!ch.IsJumping()); |
| 107 | REQUIRE_EQ(ch.GetBeginJumpX(), 0); |
| 108 | REQUIRE_EQ(ch.GetBeginJumpY(), 0); |
| 109 | REQUIRE(!ch.IsFlying()); |
| 110 | REQUIRE(!ch.IsProcessed()); |
| 111 | REQUIRE(!ch.IsPaused()); |
| 112 | REQUIRE(ch.IsActive()); |
| 113 | REQUIRE(ch.IsStopping()); |
| 114 | REQUIRE_EQ(ch.GetJumpHeight(), 0); |
| 115 | REQUIRE_EQ(ch.GetTileId(), 0); |
| 116 | REQUIRE_EQ(ch.GetSpriteX(), 0); |
| 117 | REQUIRE_EQ(ch.GetSpriteY(), 0); |
| 118 | REQUIRE_EQ(ch.GetRemainingStep(), 0); |
| 119 | REQUIRE_EQ(ch.GetAnimationType(), Game_Character::AnimType(0)); |
| 120 | // FIXME: Map |
| 121 | //REQUIRE(ch.IsInPosition(0, 0)); |
| 122 | |
| 123 | REQUIRE_EQ(ch.GetOpacity(), 255); |
| 124 | REQUIRE_EQ(ch.GetTransparency(), 0); |
| 125 | // FIXME: MAP |
| 126 | //REQUIRE(ch.IsVisible()); |
| 127 | REQUIRE(!ch.IsSpriteHidden()); |
| 128 | REQUIRE(ch.IsAnimated()); |
| 129 | REQUIRE(!ch.IsContinuous()); |
| 130 | REQUIRE(!ch.IsSpinning()); |
| 131 | // FIXME: MAP |
| 132 | // REQUIRE_EQ(ch.GetBushDepth(), 0); |
| 133 | |
| 134 | } |
| 135 | |
| 136 | static void testInitVehicle(Game_Vehicle::Type vt) { |
| 137 | Game_Vehicle ch(vt); |
no test coverage detected