From 40d9c57d64d7ff3c0cb240f3bff33bca520091ea Mon Sep 17 00:00:00 2001 From: Chris Pressey Date: Mon, 21 Oct 2019 21:23:14 +0100 Subject: [PATCH] Fix test, dump format. --- bin/sixtypical | 4 ++-- tests/SixtyPical Callgraph.md | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/sixtypical b/bin/sixtypical index f16ffac..fbe7f71 100755 --- a/bin/sixtypical +++ b/bin/sixtypical @@ -53,7 +53,7 @@ def process_input_files(filenames, options): if options.dump_callgraph: from sixtypical.callgraph import construct_callgraph graph = construct_callgraph(program) - sys.stdout.write(json.dumps(graph, indent=4, sort_keys=True, separators=(',', ':'))) + sys.stdout.write(json.dumps(graph, indent=4, sort_keys=True, separators=(',', ': '))) compilation_roster = None if options.optimize_fallthru: @@ -64,7 +64,7 @@ def process_input_files(filenames, options): return if label: sys.stdout.write("*** {}:\n".format(label)) - sys.stdout.write(json.dumps(data, indent=4, sort_keys=True, separators=(',', ':'))) + sys.stdout.write(json.dumps(data, indent=4, sort_keys=True, separators=(',', ': '))) sys.stdout.write("\n") fa = FallthruAnalyzer(symtab, debug=options.debug) diff --git a/tests/SixtyPical Callgraph.md b/tests/SixtyPical Callgraph.md index 547e590..5caf5f8 100644 --- a/tests/SixtyPical Callgraph.md +++ b/tests/SixtyPical Callgraph.md @@ -15,8 +15,9 @@ The `main` routine is always called. | define main routine | { | } - = [ - = [ - = "main" - = ] - = ] + = { + = "main": { + = "potentially-called-by": [], + = "potentially-calls": [] + = } + = }