MCPcopy Create free account
hub / github.com/HumbleUI/Skija / testICC

Method testICC

tests/java/ColorSpaceTest.java:27–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 }
26
27 private void testICC() throws IOException {
28 ColorSpace cs1 = ColorSpace.makeFromICCProfile(new byte[0]);
29 assertNull(cs1);
30
31 ColorSpace cs2 = ColorSpace.makeFromICCProfile(new byte[] { 1, 2, 3, 4, 5 });
32 assertNull(cs2);
33
34 for (String path: new String[] { "color_spaces/sRGB Profile.icc", "color_spaces/Display P3.icc" }) {
35 byte[] data = Files.readAllBytes(Path.of(path));
36 try (ColorSpace cs = ColorSpace.makeFromICCProfile(data);) {
37 assertNotNull(cs);
38 assertEquals(true, cs.isGammaCloseToSRGB());
39 }
40 }
41 }
42
43 private void testExtendedApi() throws IOException {
44 ColorSpace srgb = ColorSpace.getSRGB();

Callers 1

executeMethod · 0.95

Calls 5

makeFromICCProfileMethod · 0.95
assertNullMethod · 0.80
assertNotNullMethod · 0.80
assertEqualsMethod · 0.80
isGammaCloseToSRGBMethod · 0.45

Tested by

no test coverage detected