From d04bb6ac2dd10df914afa7d7c6cff56098aaa1ee Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Tue, 28 Jan 2025 14:12:18 +1100 Subject: [PATCH] add fallback edge for SwitchInt --- Makefile | 8 ++++++++ src/mk_graph.rs | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index eb361c2..904d2cf 100644 --- a/Makefile +++ b/Makefile @@ -125,5 +125,13 @@ integration-test: build [ -z "$$errors" ] || (echo "===============\nFAILING TESTS:$$errors"; exit 1) +integration-json: + $(MAKE) run-golden SUFFIX=json NORMALIZE="jq -S -e -f $(TESTDIR)/../normalise-filter.jq" + +integration-dot: + $(MAKE) run-golden SUFFIX=dot + +integration-test: integration-json integration-dot + golden: make integration-test DIFF=">" diff --git a/src/mk_graph.rs b/src/mk_graph.rs index 6438a8e..8507417 100644 --- a/src/mk_graph.rs +++ b/src/mk_graph.rs @@ -109,7 +109,12 @@ impl SmirJson<'_> { .edge(&this_block, block_name(name, t)) .attributes() .set_label(&format!("{d}")); - } + }; + cluster + .edge(&this_block, block_name(name, targets.otherwise())) + .attributes() + .set_label("other"); + }, Resume{} => { n.set_label("Resume");