use gsgdt::*; mod helpers; use helpers::*; #[test] fn test_graph_render() { let g1 = read_graph_from_file("tests/small_graph.json"); let settings: GraphvizSettings = Default::default(); let mut buf = Vec::new(); let expected = r#"digraph small { bb0 [shape="none", label=<
bb0
StorageLive(_1)
_1 = Vec::<i32>::new()
>]; bb1 [shape="none", label=<
bb1
resume
>]; bb0 -> bb1 [label="return"]; } "#; g1.to_dot(&mut buf, &settings, false).unwrap(); assert_eq!(String::from_utf8(buf).unwrap(), expected); }