encapsulate constants for EC

This commit is contained in:
suhrke
2017-07-05 16:00:22 -07:00
parent dbcd7c59d8
commit ff47d28870
3 changed files with 138 additions and 128 deletions

View File

@@ -78,7 +78,7 @@ TEST_CASE( "r2x: a single Pickup entity can be converted", "[EntityConverter]" )
REQUIRE( converted[0] == "\"classname\" \"weapon_grenadelauncher\"\n" );
// The z (vertical) is offset
// The z (vertical) is offset by +2
std::istringstream iss(converted[1]);
std::string attribute;
std::string coords[2];
@@ -88,7 +88,7 @@ TEST_CASE( "r2x: a single Pickup entity can be converted", "[EntityConverter]" )
REQUIRE( attribute == "\"origin\"" );
REQUIRE( coords[0] == "\"-216.00000" );
REQUIRE( coords[1] == "-1488.000488" );
REQUIRE( fabs(-100.00000 - offsetCoord) <= DELTA );
REQUIRE( fabs(-130.00000 - offsetCoord) <= DELTA );
}
@@ -119,7 +119,7 @@ TEST_CASE( "r2x: a single PlayerSpawn (teamA) entity can be converted", "[Entity
REQUIRE( converted[0] == "\"classname\" \"info_player_team1\"\n" );
REQUIRE( converted[2] == "\"angle\" \"180.00000\"\n" );
// The z (vertical) is offset
// The z (vertical) is offset by +32
std::istringstream iss(converted[1]);
std::string attribute;
std::string coords[2];
@@ -219,7 +219,7 @@ TEST_CASE( "r2x: a single Teleporter and related Target can be converted", "[Ent
REQUIRE( converted2[0] == "\"classname\" \"misc_teleporter_dest\"\n" );
REQUIRE( converted2[2] == "\"targetname\" \"tp1\"\n" );
//
// The z (vertical) is offset
// The z (vertical) is offset by +32
std::istringstream iss(converted2[1]);
std::string attribute;
std::string coords[2];