MCPcopy Create free account
hub / github.com/elftausend/graplot / test_graph

Function test_graph

tests/graph.rs:5–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4#[test]
5fn test_graph() {
6 let mut graph = Graph::new();
7 graph.set_node_color(litequad::color::DARKPURPLE);
8 let a = graph.add_node(vec![]);
9 let b = graph.add_node(vec![]);
10 let e = graph.add_node(vec![]);
11
12 let c = graph.add_node(vec![a.idx, b.idx]);
13 //let d = graph.add_node(vec![a.idx, b.idx]);
14 let d = graph.add_node(vec![e.idx, b.idx]);
15 let f = graph.add_node(vec![a.idx, d.idx]);
16
17 let _g = graph.add_node(vec![f.idx, d.idx, c.idx]);
18
19 graph.show();
20}

Callers

nothing calls this directly

Calls 3

set_node_colorMethod · 0.80
add_nodeMethod · 0.80
showMethod · 0.45

Tested by

no test coverage detected