MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / TEST

Function TEST

tests/host/frame_loop_test.cpp:72–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70};
71
72TEST(FrameLoop, TickRendersUntilBackendRequestsClose) {
73 FakeHostBackend backend{/*close_after=*/3};
74 int draws = 0;
75 FrameLoop loop{backend, [&draws] { ++draws; }};
76
77 loop.run();
78
79 // close_after=3: ticks at polls 1 and 2 render; poll reaching 3 closes.
80 EXPECT_EQ(loop.frame_count(), 2);
81 EXPECT_EQ(draws, 2);
82 EXPECT_EQ(backend.begins_, 2);
83 EXPECT_EQ(backend.ends_, 2);
84}
85
86TEST(FrameLoop, TickReturnsFalseWhenClosing) {
87 FakeHostBackend backend{/*close_after=*/1};

Callers

nothing calls this directly

Calls 3

frame_countMethod · 0.80
tickMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected