summaryrefslogtreecommitdiff
path: root/tests/dot.rs
diff options
context:
space:
mode:
authorseancarroll <seanc28@gmail.com>2021-01-08 23:30:54 -0600
committerseancarroll <seanc28@gmail.com>2021-01-08 23:30:54 -0600
commit16bf6f3f1a132c61e40a0137d69c1b53bbf7bd59 (patch)
treec5db993abe1e24a2ef068cb3b13d589765471ad7 /tests/dot.rs
parente1ff0f4992d896c9e5b47df079c1a3b33e49cd01 (diff)
downloaddotavious-16bf6f3f1a132c61e40a0137d69c1b53bbf7bd59.zip
working through how to make it easier to render DOT to string
Diffstat (limited to 'tests/dot.rs')
-rw-r--r--tests/dot.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/dot.rs b/tests/dot.rs
index fb97175..1ab467d 100644
--- a/tests/dot.rs
+++ b/tests/dot.rs
@@ -30,6 +30,18 @@ fn empty_digraph_without_id() {
}
#[test]
+fn display() {
+ let g = GraphBuilder::new_directed(None).build();
+ let dot = Dot { graph: g };
+ assert_eq!(
+ format!("{}", dot),
+ r#"digraph {
+}
+"#
+ );
+}
+
+#[test]
fn graph_comment() {
let g = GraphBuilder::new_directed(None)
.comment("Comment goes here")