test_ltface.cc: add assertions to catch command line options leaking

across tests
This commit is contained in:
Eric Wasylishen 2022-11-19 18:41:46 -07:00
parent f3b3a4de2f
commit 91a0c8e86a
2 changed files with 3 additions and 0 deletions

View File

@ -923,6 +923,8 @@ qvec3b LM_Sample(const mbsp_t *bsp, const faceextents_t &faceextents, int byte_o
{
int pixel = coord[0] + (coord[1] * faceextents.width());
assert(byte_offset_of_face >= 0);
const uint8_t* data = bsp->dlightdata.data();
if (bsp->loadversion->game->has_rgb_lightmap) {

View File

@ -150,6 +150,7 @@ TEST_CASE("-novanilla + -world_units_per_luxel")
TEST_CASE("emissive lights") {
auto [bsp, bspx] = LoadTestmap("q2_light_flush.map", {});
REQUIRE(bspx.empty());
// all of this face should be receiving some light
auto *face = BSP_FindFaceAtPoint(&bsp, &bsp.dmodels[0], {244, -92, 92});