mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-15 06:52:34 +02:00
Extract zone data tests to be more explicit
This commit is contained in:
parent
09a092475e
commit
413df08ea9
@ -9,16 +9,23 @@ struct WithLoaderIPL {
|
||||
BOOST_FIXTURE_TEST_SUITE(LoaderIPLTests, WithLoaderIPL)
|
||||
|
||||
#if RW_TEST_WITH_DATA
|
||||
BOOST_AUTO_TEST_CASE(test_load_zones) {
|
||||
BOOST_AUTO_TEST_CASE(zone_count_is_correct) {
|
||||
const auto& gdpath = Global::get().getGamePath();
|
||||
BOOST_REQUIRE(loader.load(gdpath + "/data/gta3.zon"));
|
||||
|
||||
BOOST_REQUIRE(loader.zones.size() > 2);
|
||||
|
||||
auto& zone1 = loader.zones[0];
|
||||
BOOST_CHECK_EQUAL(zone1.name, "ROADBR1");
|
||||
BOOST_TEST(loader.zones.size() == 42);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(zone_data_is_correct) {
|
||||
const auto& gdpath = Global::get().getGamePath();
|
||||
BOOST_REQUIRE(loader.load(gdpath + "/data/gta3.zon"));
|
||||
|
||||
auto& zone1 = loader.zones[1];
|
||||
BOOST_TEST(zone1.name == "PORT_W");
|
||||
BOOST_TEST(zone1.type == 0);
|
||||
BOOST_TEST(zone1.min.x == 751.68f);
|
||||
BOOST_TEST(zone1.island == 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
Loading…
Reference in New Issue
Block a user