| 22 | } |
| 23 | |
| 24 | TEST(SpawnTest, RandomCelestialWorld) { |
| 25 | CelestialMasterDatabase celestialDatabase; |
| 26 | Maybe<CelestialCoordinate> celestialWorld = celestialDatabase.findRandomWorld(10, 50, [&](CelestialCoordinate const& coord) { |
| 27 | return celestialDatabase.parameters(coord)->isVisitable(); |
| 28 | }); |
| 29 | ASSERT_TRUE((bool)celestialWorld); |
| 30 | |
| 31 | TestUniverse testUniverse(Vec2U(100, 100)); |
| 32 | WorldId worldId = CelestialWorldId(*celestialWorld); |
| 33 | testUniverse.warpPlayer(worldId); |
| 34 | EXPECT_EQ(testUniverse.currentPlayerWorld(), worldId); |
| 35 | validateWorld(testUniverse); |
| 36 | } |
| 37 | |
| 38 | TEST(SpawnTest, RandomInstanceWorld) { |
| 39 | auto& root = Root::singleton(); |
nothing calls this directly
no test coverage detected