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

Function TEST

tests/host/ui/svg_raster_test.cpp:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45TEST(SvgRaster, ChannelIconRasterizesAtQtSize) {
46 // The legacy Qt frontend drew channel icons at 10x10 logical (see tag
47 // legacy-qt); x2 = a 2.0 content scale.
48 const auto px =
49 oid::host::rasterize_svg(oid::host::icons::kLabelRedChannelSvg,
50 sizeof(oid::host::icons::kLabelRedChannelSvg),
51 20,
52 20);
53 ASSERT_EQ(px.size(), 20u * 20u * 4u);
54 EXPECT_TRUE(has_nonzero_alpha(px));
55}
56
57TEST(SvgRaster, LowerUpperBoundRasterizesNonSquare) {
58 // Qt size 8x35 (setVectorIcon call), x2.

Callers

nothing calls this directly

Calls 3

rasterize_svgFunction · 0.85
has_nonzero_alphaFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected