|
@@ -137,6 +137,8 @@ TEST(director, director_parsing_density) {
|
|
|
// Check that each sector was correctly processed
|
|
|
std::vector<int> sectors = {70, 441, 575, 600, 629, 711};
|
|
|
|
|
|
+ const char * D = "_density";
|
|
|
+
|
|
|
json sector_data;
|
|
|
sector_data[70]["density"] = 0;
|
|
|
sector_data[70]["warps"] = 6;
|
|
@@ -172,19 +174,19 @@ TEST(director, director_parsing_density) {
|
|
|
for (auto sector : sectors) {
|
|
|
std::string sector_text = std::to_string(sector);
|
|
|
// GTEST_COUT << "Testing Sector " << sector << std::endl;
|
|
|
- EXPECT_EQ(json_int(dir.galaxy.meta["density"][sector_text]["density"]),
|
|
|
+ EXPECT_EQ(json_int(dir.galaxy.meta[D][sector_text]["density"]),
|
|
|
sector_data[sector]["density"])
|
|
|
<< "Sector " << sector << " density";
|
|
|
- EXPECT_EQ(json_int(dir.galaxy.meta["density"][sector_text]["warps"]),
|
|
|
+ EXPECT_EQ(json_int(dir.galaxy.meta[D][sector_text]["warps"]),
|
|
|
sector_data[sector]["warps"])
|
|
|
<< "Sector " << sector << " warps";
|
|
|
- EXPECT_EQ(json_int(dir.galaxy.meta["density"][sector_text]["navhaz"]),
|
|
|
+ EXPECT_EQ(json_int(dir.galaxy.meta[D][sector_text]["navhaz"]),
|
|
|
(int)sector_data[sector]["navhaz"])
|
|
|
<< "Sector " << sector << " navhaz";
|
|
|
- EXPECT_EQ(dir.galaxy.meta["density"][sector_text]["anom"],
|
|
|
+ EXPECT_EQ(dir.galaxy.meta[D][sector_text]["anom"],
|
|
|
(bool)sector_data[sector]["anom"])
|
|
|
<< "Sector " << sector << " anom";
|
|
|
- EXPECT_EQ(dir.galaxy.meta["density"][sector_text]["known"],
|
|
|
+ EXPECT_EQ(dir.galaxy.meta[D][sector_text]["known"],
|
|
|
(bool)sector_data[sector]["known"])
|
|
|
<< "Sector " << sector << " known";
|
|
|
}
|