Created
November 22, 2024 13:01
-
-
Save Rseding91/82adb034ce4f27692ef5d9f5887bbf09 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEST(SpiderSetupPositionDoesNotGenerateChunks) | |
{ | |
TestScenario scenario; | |
const size_t chunksTotalBefore = scenario.getMap().chunksTotal; | |
ScopedSetter guard(CorePrototypes::defaultTile, TileID("out-of-map").getPrototype()); | |
for (bool simulation : { true, false }) | |
{ | |
auto spider = scenario.constructEntity("spidertron", MapPosition(5000, 5000), IsSimulation::fromBool(simulation)); | |
{ | |
spider->setupPosition(scenario.getDefaultSurface()); | |
spider->setupBoundingBox(); | |
EntityGhostBuildabilityHelper helper(spider.get()); | |
} | |
CHECK_EQUAL(scenario.getMap().chunksTotal, chunksTotalBefore); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment