MCPcopy Index your code
hub / github.com/benfry/processing4 / testDecimals

Method testDecimals

core/test/processing/core/PShapeSVGTest.java:15–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13 private static final String TEST_CONTENT = "<svg><g><path d=\"L 0,3.1.4.1\"/></g></svg>";
14
15 @Test
16 public void testDecimals() {
17 try {
18 XML xml = XML.parse(TEST_CONTENT);
19 PShapeSVG shape = new PShapeSVG(xml);
20 PShape[] children = shape.getChildren();
21 Assert.assertEquals(1, children.length);
22 PShape[] grandchildren = children[0].getChildren();
23 Assert.assertEquals(1, grandchildren.length);
24 Assert.assertEquals(0, grandchildren[0].getChildCount());
25 Assert.assertEquals(2, grandchildren[0].getVertexCount());
26 }
27 catch (Exception e) {
28 Assert.fail("Encountered exception " + e);
29 }
30 }
31
32}

Callers

nothing calls this directly

Calls 4

parseMethod · 0.95
getChildrenMethod · 0.45
getChildCountMethod · 0.45
getVertexCountMethod · 0.45

Tested by

no test coverage detected