Skip to content

Commit 48d0455

Browse files
committed
Uncomment test
1 parent 3eae3e8 commit 48d0455

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

CesiumVectorData/test/TestVectorRasterizer.cpp

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ TEST_CASE("VectorRasterizer::rasterize") {
328328
checkFilesEqual(dir / "styling.tga", thisDir / "styling.tga");
329329
}
330330

331-
/*SUBCASE("Random color uses the same color across calls") {
331+
SUBCASE("Random color uses the same color across calls") {
332332
CesiumUtility::IntrusivePointer<CesiumGltf::ImageAsset> asset;
333333
asset.emplace();
334334
asset->width = 1;
@@ -338,31 +338,29 @@ TEST_CASE("VectorRasterizer::rasterize") {
338338
asset->pixelData.resize(4, std::byte{255});
339339

340340
CartographicPolygon square(std::vector<glm::dvec2>{
341-
glm::dvec2{Math::degreesToRadians(0.0), Math::degreesToRadians(0.0)},
342-
glm::dvec2{Math::degreesToRadians(0.0), Math::degreesToRadians(1.0)},
343-
glm::dvec2{Math::degreesToRadians(1.0), Math::degreesToRadians(1.0)},
344-
glm::dvec2{Math::degreesToRadians(1.0), Math::degreesToRadians(0.0)},
345-
glm::dvec2{Math::degreesToRadians(0.0), Math::degreesToRadians(0.0)}
346-
});
341+
glm::dvec2{Math::degreesToRadians(0.0), Math::degreesToRadians(0.0)},
342+
glm::dvec2{Math::degreesToRadians(0.0), Math::degreesToRadians(1.0)},
343+
glm::dvec2{Math::degreesToRadians(1.0), Math::degreesToRadians(1.0)},
344+
glm::dvec2{Math::degreesToRadians(1.0), Math::degreesToRadians(0.0)},
345+
glm::dvec2{Math::degreesToRadians(0.0), Math::degreesToRadians(0.0)}});
347346

348347
VectorStyle style;
349-
style.polygon.fill = ColorStyle {
350-
Color { 0xff, 0x00, 0xaa, 0xff },
351-
ColorMode::Random
352-
};
348+
style.polygon.fill =
349+
ColorStyle{Color{0xff, 0x00, 0xaa, 0xff}, ColorMode::Random};
353350

354351
VectorRasterizer rasterizer(rect, asset);
355352
rasterizer.drawPolygon(square, style.polygon);
356353
rasterizer.finalize();
357354

358355
const uint32_t writtenColor =
359-
*reinterpret_cast<uint32_t*>(asset->pixelData.data()); VectorRasterizer
360-
rasterizer2(rect, asset); rasterizer2.drawPolygon(square, style.polygon);
356+
*reinterpret_cast<uint32_t*>(asset->pixelData.data());
357+
VectorRasterizer rasterizer2(rect, asset);
358+
rasterizer2.drawPolygon(square, style.polygon);
361359
rasterizer2.finalize();
362360

363-
CHECK(*reinterpret_cast<uint32_t*>(asset->pixelData.data()) ==
364-
writtenColor);
365-
}*/
361+
CHECK(
362+
*reinterpret_cast<uint32_t*>(asset->pixelData.data()) == writtenColor);
363+
}
366364
}
367365

368366
TEST_CASE("VectorRasterizer::rasterize benchmark" * doctest::skip(true)) {

0 commit comments

Comments
 (0)