MCPcopy Create free account
hub / github.com/Snapchat/Valdi / TEST

Function TEST

snap_drawing/test/src/SVGImage_tests.cpp:41–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39// --- isSVG detection ---
40
41TEST(SVGImage, detectsSVGAfterWhitespace) {
42 auto svg = bytesFromString(" \n<svg width=\"12\" height=\"10\" xmlns=\"http://www.w3.org/2000/svg\"></svg>");
43
44 ASSERT_TRUE(Image::isSVG(svg));
45}
46
47TEST(SVGImage, detectsXMLPreamble) {
48 auto svg = bytesFromString("<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg></svg>");

Callers

nothing calls this directly

Calls 15

isSVGFunction · 0.85
getSVGSizeFunction · 0.85
rasterizeSVGFunction · 0.85
bytesFromStringFunction · 0.70
expectBitmapIsRedFunction · 0.70
toStringMethod · 0.65
errorMethod · 0.65
valueMethod · 0.65
getInfoMethod · 0.65
widthMethod · 0.45
heightMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected