From ee182744d81a0ffc7169b04af340a29d486a9f7c Mon Sep 17 00:00:00 2001 From: Raine-Yang-UofT Date: Wed, 25 Sep 2024 22:45:11 -0400 Subject: [PATCH] tests: update testing snapshot Update expected snapshot test case for CFG diagram --- tests/test_cfg/snapshots/funcs_only.gv | 16 ++++++++-------- tests/test_cfg/snapshots/my_file.gv | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/test_cfg/snapshots/funcs_only.gv b/tests/test_cfg/snapshots/funcs_only.gv index b961f6626..d06dd7bba 100644 --- a/tests/test_cfg/snapshots/funcs_only.gv +++ b/tests/test_cfg/snapshots/funcs_only.gv @@ -2,29 +2,29 @@ digraph funcs_only { node [fontname="Courier New" shape=box] subgraph cluster_0 { cluster_0_0 [label="self\l" fillcolor=white style=filled] - cluster_0_0 -> cluster_0_2 + cluster_0_0 -> cluster_0_2 [color=black] cluster_0_2 [label="print('method')\l" fillcolor=white style=filled] - cluster_0_2 -> cluster_0_1 + cluster_0_2 -> cluster_0_1 [color=black] cluster_0_1 [label="\l" fillcolor=black style=filled] fontname="Courier New" label="MyClass.foo" } subgraph cluster_1 { cluster_1_0 [label="\l" fillcolor=white style=filled] - cluster_1_0 -> cluster_1_2 + cluster_1_0 -> cluster_1_2 [color=black] cluster_1_2 [label="a = 5\l" fillcolor=white style=filled] - cluster_1_2 -> cluster_1_1 + cluster_1_2 -> cluster_1_1 [color=black] cluster_1_1 [label="\l" fillcolor=black style=filled] fontname="Courier New" label=foo } subgraph cluster_2 { cluster_2_0 [label="\l" fillcolor=white style=filled] - cluster_2_0 -> cluster_2_2 + cluster_2_0 -> cluster_2_2 [color=black] cluster_2_2 [label="a > 0\l" fillcolor=white style=filled] - cluster_2_2 -> cluster_2_3 [label=True] + cluster_2_2 -> cluster_2_3 [label=True color=black] cluster_2_3 [label="owl = 'hoo'\l" fillcolor=white style=filled] - cluster_2_3 -> cluster_2_1 + cluster_2_3 -> cluster_2_1 [color=black] cluster_2_1 [label="\l" fillcolor=black style=filled] - cluster_2_2 -> cluster_2_1 [label=False] + cluster_2_2 -> cluster_2_1 [label=False color=black] fontname="Courier New" label=hoo } } diff --git a/tests/test_cfg/snapshots/my_file.gv b/tests/test_cfg/snapshots/my_file.gv index 36ac57459..da3170ed6 100644 --- a/tests/test_cfg/snapshots/my_file.gv +++ b/tests/test_cfg/snapshots/my_file.gv @@ -2,23 +2,23 @@ digraph my_file { node [fontname="Courier New" shape=box] subgraph cluster_0 { cluster_0_0 [label="\ldef foo() -> None:\l for i in range(1, 10):\l if i < 5:\l print('hi')\l" fillcolor=white style=filled] - cluster_0_0 -> cluster_0_1 + cluster_0_0 -> cluster_0_1 [color=black] cluster_0_1 [label="\l" fillcolor=black style=filled] fontname="Courier New" label=__main__ } subgraph cluster_1 { cluster_1_0 [label="\l" fillcolor=white style=filled] - cluster_1_0 -> cluster_1_2 + cluster_1_0 -> cluster_1_2 [color=black] cluster_1_2 [label="range(1, 10)\l" fillcolor=white style=filled] - cluster_1_2 -> cluster_1_3 + cluster_1_2 -> cluster_1_3 [color=black] cluster_1_3 [label="i\l" fillcolor=white style=filled] - cluster_1_3 -> cluster_1_5 + cluster_1_3 -> cluster_1_5 [color=black] cluster_1_5 [label="i < 5\l" fillcolor=white style=filled] - cluster_1_5 -> cluster_1_6 [label=True] + cluster_1_5 -> cluster_1_6 [label=True color=black] cluster_1_6 [label="print('hi')\l" fillcolor=white style=filled] - cluster_1_6 -> cluster_1_3 - cluster_1_5 -> cluster_1_3 [label=False] - cluster_1_3 -> cluster_1_1 + cluster_1_6 -> cluster_1_3 [color=black] + cluster_1_5 -> cluster_1_3 [label=False color=black] + cluster_1_3 -> cluster_1_1 [color=black] cluster_1_1 [label="\l" fillcolor=black style=filled] fontname="Courier New" label=foo }