MCPcopy Create free account
hub / github.com/dejwk/roo_display / TEST

Function TEST

test/streamable_stack_test.cpp:13–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace roo_display {
12
13TEST(StreamableStack, Empty) {
14 StreamableStack stack(Box(3, 4, 5, 7));
15 EXPECT_EQ(stack.naturalExtents(), Box(0, 0, -1, -1));
16 FakeOffscreen<Rgb565> test_screen(10, 11, color::Black);
17 Display display(test_screen);
18 {
19 DrawingContext dc(display);
20 dc.draw(stack);
21 }
22 EXPECT_THAT(test_screen, MatchesContent(WhiteOnBlack(), 10, 11,
23 " "
24 " "
25 " "
26 " "
27 " "
28 " "
29 " "
30 " "
31 " "
32 " "
33 " "));
34}
35
36TEST(StreamableStack, SingleUnclipped) {
37 auto input = MakeTestStreamable(Grayscale4(), Box(0, 0, 3, 3),

Callers

nothing calls this directly

Calls 11

BoxClass · 0.85
MatchesContentFunction · 0.85
WhiteOnBlackFunction · 0.85
MakeTestStreamableFunction · 0.85
Grayscale4Class · 0.85
Alpha4Class · 0.85
setClipBoxMethod · 0.80
naturalExtentsMethod · 0.45
drawMethod · 0.45
createStreamMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected