File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -362,6 +362,9 @@ TEST_F(PenLayerTest, DrawLine)
362
362
363
363
TEST_F (PenLayerTest, Stamp)
364
364
{
365
+ static const std::chrono::milliseconds timeout (5000 );
366
+ auto startTime = std::chrono::steady_clock::now ();
367
+
365
368
PenLayer penLayer;
366
369
penLayer.setWidth (480 );
367
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" );
374
- loader.start (); // wait until it loads
377
+
378
+ while (loader.loadStatus () != ProjectLoader::LoadStatus::Loaded)
379
+ ASSERT_LE (std::chrono::steady_clock::now (), startTime + timeout);
375
380
376
381
EXPECT_CALL (engine, stageWidth ()).WillRepeatedly (Return (480 ));
377
382
EXPECT_CALL (engine, stageHeight ()).WillRepeatedly (Return (360 ));
You can’t perform that action at this time.
0 commit comments