We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af12984 commit c5ec812Copy full SHA for c5ec812
test/penlayer/penlayer_test.cpp
@@ -362,6 +362,9 @@ TEST_F(PenLayerTest, DrawLine)
362
363
TEST_F(PenLayerTest, Stamp)
364
{
365
+ static const std::chrono::milliseconds timeout(5000);
366
+ auto startTime = std::chrono::steady_clock::now();
367
+
368
PenLayer penLayer;
369
penLayer.setWidth(480);
370
penLayer.setHeight(360);
@@ -371,7 +374,9 @@ TEST_F(PenLayerTest, Stamp)
371
374
372
375
ProjectLoader loader;
373
376
loader.setFileName("stamp_env.sb3");
- loader.start(); // wait until it loads
377
378
+ while (loader.loadStatus() != ProjectLoader::LoadStatus::Loaded)
379
+ ASSERT_LE(std::chrono::steady_clock::now(), startTime + timeout);
380
381
EXPECT_CALL(engine, stageWidth()).WillRepeatedly(Return(480));
382
EXPECT_CALL(engine, stageHeight()).WillRepeatedly(Return(360));
0 commit comments