include only needed catch2 headers

This commit is contained in:
Eric Wasylishen 2022-09-28 22:24:33 -06:00
parent 1726f95484
commit d9d4ee99ad
7 changed files with 30 additions and 26 deletions

View File

@ -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"

View File

@ -1,4 +1,4 @@
#include <catch2/catch_all.hpp> #include <catch2/catch_test_macros.hpp>
#include <filesystem> #include <filesystem>
#include <string> #include <string>

View File

@ -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>

View File

@ -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>

View File

@ -1,3 +0,0 @@
#include <catch2/catch_all.hpp>
#include <light/ltface.hh>

View File

@ -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,7 +566,10 @@ 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"};
for (const auto& mapname : quake_maps) {
DYNAMIC_SECTION("testing " << mapname) {
const auto [bsp, bspx, prt] = LoadTestmapQ1(mapname); const auto [bsp, bspx, prt] = LoadTestmapQ1(mapname);
@ -587,6 +592,8 @@ TEST_CASE("simple_sealed", "[testmaps_q1]")
CHECK(bsp.dleafs[1].firstmarksurface == 0); CHECK(bsp.dleafs[1].firstmarksurface == 0);
CHECK_THAT(bsp.dleaffaces, Catch::Matchers::UnorderedEquals(std::vector<uint32_t>{0, 1, 2, 3, 4, 5})); 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]")
{ {

View File

@ -1,2 +0,0 @@
#include <catch2/catch_all.hpp>