Also test with forbidHoles enabled.

This commit is contained in:
Kevin Ring 2023-02-23 15:57:05 +11:00
parent 854f0abbf4
commit 05b94f1be3
1 changed files with 19 additions and 2 deletions

View File

@ -1091,7 +1091,9 @@ TEST_CASE("Can load example tileset.json from 3DTILES_bounding_volume_S2 "
REQUIRE(pGreatGrandchild->getChildren().empty());
}
TEST_CASE("An unconditionally-refined tile is not rendered") {
namespace {
void runUnconditionallyRefinedTestCase(const TilesetOptions& options) {
class CustomContentLoader : public TilesetContentLoader {
public:
Tile* _pRootTile = nullptr;
@ -1172,7 +1174,8 @@ TEST_CASE("An unconditionally-refined tile is not rendered") {
Tileset tileset(
tilesetExternals,
std::move(pCustomLoader),
pCustomLoader->createRootTile());
pCustomLoader->createRootTile(),
options);
// On the first update, we should render the root tile, even though nothing is
// loaded yet.
@ -1204,3 +1207,17 @@ TEST_CASE("An unconditionally-refined tile is not rendered") {
pRawLoader->_grandchildPromise->resolve(
TileLoadResult::createFailedResult(nullptr));
}
}
TEST_CASE("An unconditionally-refined tile is not rendered") {
SECTION("With default settings") {
runUnconditionallyRefinedTestCase(TilesetOptions());
}
SECTION("With forbidHoles enabled") {
TilesetOptions options{};
options.forbidHoles = true;
runUnconditionallyRefinedTestCase(options);
}
}