MCPcopy Create free account
hub / github.com/bwapi/bwapi / TEST_METHOD

Function TEST_METHOD

bwapi/BWAPILIBTest/unitTypesTest.cpp:106–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 AssertSetEquals({}, t.upgradesWhat());
105 }
106 TEST_METHOD(UnitTypeTerran_Ghost)
107 {
108 auto t = BWAPI::UnitTypes::Terran_Ghost;
109 Assert_enum(Terran_Ghost);
110
111 Assert_getName(Terran_Ghost);
112 Assert::AreEqual(t.c_str(), t.getName().c_str());
113 Assert_getRace(Terran);
114 Assert_whatBuilds(Terran_Barracks, 1);
115 AssertSetEquals({ { BWAPI::UnitTypes::Terran_Barracks, 1 }, { BWAPI::UnitTypes::Terran_Academy, 1 }, { BWAPI::UnitTypes::Terran_Covert_Ops, 1 } }, t.requiredUnits());
116 Assert_requiredTech(None);
117 Assert_cloakingTech(Personnel_Cloaking);
118 AssertSetEquals({ BWAPI::TechTypes::Lockdown, BWAPI::TechTypes::Personnel_Cloaking, BWAPI::TechTypes::Nuclear_Strike }, t.abilities());
119 AssertSetEquals({ BWAPI::UpgradeTypes::Terran_Infantry_Armor, BWAPI::UpgradeTypes::Terran_Infantry_Weapons, BWAPI::UpgradeTypes::Ocular_Implants, BWAPI::UpgradeTypes::Moebius_Reactor }, t.upgrades());
120 Assert_armorUpgrade(Terran_Infantry_Armor);
121 Assert_maxHitPoints(45);
122 Assert_maxShields(0);
123 Assert_maxEnergy(200);
124 Assert_armor(0);
125 Assert_mineralPrice(25);
126 Assert_gasPrice(75);
127 Assert_buildTime(750);
128 Assert_supplyRequired(2);
129 Assert_supplyProvided(0);
130 Assert_spaceRequired(1);
131 Assert_spaceProvided(0);
132 Assert_buildScore(175);
133 Assert_destroyScore(350);
134 Assert_size(Small);
135 Assert_tileWidth(1);
136 Assert_tileHeight(1);
137 Assert_tileSize(BWAPI::TilePosition(1, 1));
138 Assert::AreEqual(BWAPI::TilePosition(t.tileWidth(), t.tileHeight()), t.tileSize());
139 Assert_dimensionLeft(7);
140 Assert_dimensionUp(10);
141 Assert_dimensionRight(7);
142 Assert_dimensionDown(11);
143 Assert_width(15);
144 Assert::AreEqual(t.dimensionLeft() + 1 + t.dimensionRight(), t.width());
145 Assert_height(22);
146 Assert::AreEqual(t.dimensionUp() + 1 + t.dimensionDown(), t.height());
147 Assert_seekRange(0);
148 Assert_sightRange(288);
149 Assert_groundWeapon(C_10_Canister_Rifle);
150 Assert_maxGroundHits(1);
151 Assert_airWeapon(C_10_Canister_Rifle);
152 Assert_maxAirHits(1);
153 Assert_topSpeed(4.00000);
154 Assert_acceleration(1);
155 Assert_haltDistance(1);
156 Assert_turnRadius(40);
157 Assert_canProduce(false);
158 Assert_canAttack(true);
159 Assert_canMove(true);
160 Assert_isFlyer(false);
161 Assert_regeneratesHP(false);
162 Assert_isSpellcaster(true);
163 Assert_hasPermanentCloak(false);

Callers

nothing calls this directly

Calls 12

AssertSetEqualsFunction · 0.85
c_strMethod · 0.80
tileWidthMethod · 0.80
tileHeightMethod · 0.80
tileSizeMethod · 0.80
dimensionLeftMethod · 0.80
dimensionRightMethod · 0.80
dimensionUpMethod · 0.80
dimensionDownMethod · 0.80
getNameMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected