include only needed catch2 headers
This commit is contained in:
parent
1726f95484
commit
d9d4ee99ad
|
|
@ -1,4 +1,5 @@
|
||||||
#include <catch2/catch_all.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
#include <catch2/catch_approx.hpp>
|
||||||
|
|
||||||
#include "common/settings.hh"
|
#include "common/settings.hh"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <catch2/catch_all.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <catch2/catch_all.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include <light/entities.hh>
|
#include <light/entities.hh>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include <catch2/catch_all.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
#include <catch2/catch_approx.hpp>
|
||||||
|
|
||||||
#include <light/light.hh>
|
#include <light/light.hh>
|
||||||
#include <light/entities.hh>
|
#include <light/entities.hh>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#include <catch2/catch_all.hpp>
|
|
||||||
|
|
||||||
#include <light/ltface.hh>
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
#include <catch2/catch_all.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
#include <catch2/matchers/catch_matchers_vector.hpp>
|
||||||
|
#include <catch2/matchers/catch_matchers_string.hpp>
|
||||||
|
|
||||||
#include <qbsp/brush.hh>
|
#include <qbsp/brush.hh>
|
||||||
#include <qbsp/brushbsp.hh>
|
#include <qbsp/brushbsp.hh>
|
||||||
|
|
@ -564,28 +566,33 @@ TEST_CASE("chop_no_change", "[testmaps_q1]")
|
||||||
|
|
||||||
TEST_CASE("simple_sealed", "[testmaps_q1]")
|
TEST_CASE("simple_sealed", "[testmaps_q1]")
|
||||||
{
|
{
|
||||||
auto mapname = GENERATE("qbsp_simple_sealed.map", "qbsp_simple_sealed_rotated.map");
|
const std::vector<std::string> quake_maps{"qbsp_simple_sealed.map", "qbsp_simple_sealed_rotated.map"};
|
||||||
|
|
||||||
const auto [bsp, bspx, prt] = LoadTestmapQ1(mapname);
|
for (const auto& mapname : quake_maps) {
|
||||||
|
DYNAMIC_SECTION("testing " << mapname) {
|
||||||
|
|
||||||
REQUIRE(bsp.dleafs.size() == 2);
|
const auto [bsp, bspx, prt] = LoadTestmapQ1(mapname);
|
||||||
|
|
||||||
REQUIRE(bsp.dleafs[0].contents == CONTENTS_SOLID);
|
REQUIRE(bsp.dleafs.size() == 2);
|
||||||
REQUIRE(bsp.dleafs[1].contents == CONTENTS_EMPTY);
|
|
||||||
|
|
||||||
// just a hollow box
|
|
||||||
REQUIRE(bsp.dfaces.size() == 6);
|
|
||||||
|
|
||||||
// no bspx lumps
|
REQUIRE(bsp.dleafs[0].contents == CONTENTS_SOLID);
|
||||||
CHECK(bspx.empty());
|
REQUIRE(bsp.dleafs[1].contents == CONTENTS_EMPTY);
|
||||||
|
|
||||||
// check markfaces
|
// just a hollow box
|
||||||
CHECK(bsp.dleafs[0].nummarksurfaces == 0);
|
REQUIRE(bsp.dfaces.size() == 6);
|
||||||
CHECK(bsp.dleafs[0].firstmarksurface == 0);
|
|
||||||
|
|
||||||
CHECK(bsp.dleafs[1].nummarksurfaces == 6);
|
// no bspx lumps
|
||||||
CHECK(bsp.dleafs[1].firstmarksurface == 0);
|
CHECK(bspx.empty());
|
||||||
CHECK_THAT(bsp.dleaffaces, Catch::Matchers::UnorderedEquals(std::vector<uint32_t>{0,1,2,3,4,5}));
|
|
||||||
|
// check markfaces
|
||||||
|
CHECK(bsp.dleafs[0].nummarksurfaces == 0);
|
||||||
|
CHECK(bsp.dleafs[0].firstmarksurface == 0);
|
||||||
|
|
||||||
|
CHECK(bsp.dleafs[1].nummarksurfaces == 6);
|
||||||
|
CHECK(bsp.dleafs[1].firstmarksurface == 0);
|
||||||
|
CHECK_THAT(bsp.dleaffaces, Catch::Matchers::UnorderedEquals(std::vector<uint32_t>{0, 1, 2, 3, 4, 5}));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("simple_sealed2", "[testmaps_q1]")
|
TEST_CASE("simple_sealed2", "[testmaps_q1]")
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
#include <catch2/catch_all.hpp>
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue