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

Function TEST

test/rasterizable_stack_test.cpp:60–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58} // namespace
59
60TEST(RasterizableStack, Empty) {
61 RasterizableStack stack(Box(3, 4, 5, 7));
62 EXPECT_EQ(stack.naturalExtents(), Box(0, 0, -1, -1));
63 FakeOffscreen<Rgb565> test_screen(10, 11, color::Black);
64 Display display(test_screen);
65 {
66 DrawingContext dc(display);
67 dc.draw(stack);
68 }
69 EXPECT_THAT(test_screen, MatchesContent(WhiteOnBlack(), 10, 11,
70 " "
71 " "
72 " "
73 " "
74 " "
75 " "
76 " "
77 " "
78 " "
79 " "
80 " "));
81}
82
83TEST(RasterizableStack, SingleUnclipped) {
84 auto input = MakeTestRasterizable(Grayscale4(), Box(0, 0, 3, 3),

Callers

nothing calls this directly

Calls 12

BoxClass · 0.85
MatchesContentFunction · 0.85
WhiteOnBlackFunction · 0.85
MakeTestRasterizableFunction · 0.85
Grayscale4Class · 0.85
Alpha4Class · 0.85
setClipBoxMethod · 0.80
readColorRectCallsMethod · 0.80
naturalExtentsMethod · 0.45
drawMethod · 0.45
readColorRectMethod · 0.45

Tested by

no test coverage detected