Skip to content

Commit 6a8eb34

Browse files
committed
improve tests for UI scale, silence warning
1 parent cbd528f commit 6a8eb34

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

test/src/basics_test.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ TEST_F(PolyscopeTest, NavigationMode) {
169169
polyscope::view::setNavigateStyle(polyscope::NavigateStyle::Turntable); // set back to usual default
170170
}
171171

172+
TEST_F(PolyscopeTest, UIScale) {
173+
174+
// this should trigger a reload of the font atlas
175+
176+
polyscope::options::uiScale = 1.25;
177+
polyscope::show(3);
178+
179+
polyscope::options::uiScale = 1.;
180+
polyscope::show(3);
181+
}
172182

173183
// ============================================================
174184
// =============== Ground plane tests

test/src/floating_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ TEST_F(PolyscopeTest, FloatingRenderImageTest) {
193193

194194
TEST_F(PolyscopeTest, ImplicitSurfaceRenderImageQuantityTest) {
195195

196+
// disable for this test
197+
polyscope::options::warnForInvalidValues = false;
198+
196199
// sample sdf & color functions
197200
auto torusSDF = [](glm::vec3 p) {
198201
float scale = 0.5;
@@ -248,4 +251,5 @@ TEST_F(PolyscopeTest, ImplicitSurfaceRenderImageQuantityTest) {
248251
polyscope::options::transparencyMode = polyscope::TransparencyMode::None;
249252

250253
polyscope::removeAllStructures();
254+
polyscope::options::warnForInvalidValues = true;
251255
}

0 commit comments

Comments
 (0)