MCPcopy Index your code
hub / github.com/Col-E/Recaf / testChain

Method testChain

src/test/java/me/coley/recaf/FlowGraphTest.java:54–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 }
53
54 @Test
55 public void testChain() {
56 // one -> two --> three
57 FlowVertex one = graph.getVertex("test/Chain", "one", "()V");
58 FlowVertex two = graph.getVertex("test/Chain", "two", "()V");
59 FlowVertex three = graph.getVertex("test/Chain", "three", "()V");
60 // Use search to show the path following the chain
61 SearchResult<ClassReader> result = new ClassDfsSearch(ClassDfsSearch.Type.ALL).find(one, three);
62 assertNotNull(result);
63 List<Vertex<ClassReader>> path = result.getPath();
64 assertEquals(3, path.size());
65 assertEquals(one, path.get(0));
66 assertEquals(two, path.get(1));
67 assertEquals(three, path.get(2));
68 }
69
70 @Test
71 public void testLoopback() {

Callers

nothing calls this directly

Calls 5

getVertexMethod · 0.65
findMethod · 0.65
getPathMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected