added unsupported entity case to EC unit tests

This commit is contained in:
suhrke 2017-07-05 03:27:00 -07:00
parent d47b0af646
commit dcf6e76f39

View File

@ -27,6 +27,30 @@
TEST_CASE( "r2x: Unsupported entity types cause return of empty vector", "[EntityConverter]" ) {
// Instantiate object
EntityConverter ec (PICKUP_FILENAME);
// Mock up entity
std::vector<std::string> entity;
entity.push_back(" type Worldspawn");
// Mock up entity queue
std::queue<std::vector<std::string>> q;
q.push( entity );
// Match related entities (none)
ec.matchRelated( q );
// Convert a single entity
std::vector<std::string> converted = ec.convert(entity);
REQUIRE( converted.size() == 0 );
}
TEST_CASE( "r2x: a single Pickup entity can be converted", "[EntityConverter]" ) {
// Instantiate object