1// RUN: %exploded_graph_rewriter -d %s | FileCheck %s
2
3// No diffs on the first node, nothing to check.
4Node0x1 [shape=record,label=
5 "{
6    {
7      "state_id": 2,
8      "program_points": [
9        {
10          "kind": "BlockEntrance", "block_id": 1,
11          "terminator": null, "term_kind": null,
12          "tag": null, "node_id": 1,
13          "has_report": 0, "is_sink": 0
14        }
15      ],
16      "program_state": {
17        "store": null,
18        "constraints": null,
19        "dynamic_types": null,
20        "constructing_objects": null,
21        "index_of_element": null,
22        "checker_messages": null,
23        "environment": {
24          "pointer": "0x2",
25          "items": [
26            {
27              "location_context": "#0 Call",
28              "lctx_id": 3,
29              "calling": "foo",
30              "location": null,
31              "items": [
32                {
33                  "stmt_id": 5,
34                  "pretty": "bar()",
35                  "value": "Unknown"
36                }
37              ]
38            }
39          ]
40        }
41      }
42    }
43\l}"];
44
45Node0x1 -> Node0x6;
46
47// CHECK: Node0x6 [
48// CHECK-SAME: <tr>
49// CHECK-SAME:   <td><font color="red">-</font></td>
50// CHECK-SAME:   <td align="left"><i>S5</i></td>
51// CHECK-SAME:   <td align="left">bar()</td>
52// CHECK-SAME:   <td align="left">Unknown</td>
53// CHECK-SAME: </tr>
54// CHECK-SAME: <tr>
55// CHECK-SAME:   <td><font color="forestgreen">+</font></td>
56// CHECK-SAME:   <td align="left"><i>S9</i></td>
57// CHECK-SAME:   <td align="left">baz()</td>
58// CHECK-SAME:   <td align="left">Undefined</td>
59// CHECK-SAME: </tr>
60Node0x6 [shape=record,label=
61 "{
62    {
63      "state_id": 7,
64      "program_points": [
65        {
66          "kind": "BlockEntrance", "block_id": 1,
67          "terminator": null, "term_kind": null,
68          "tag": null, "node_id": 1,
69          "has_report": 0, "is_sink": 0
70        }
71      ],
72      "program_state": {
73        "store": null,
74        "constraints": null,
75        "dynamic_types": null,
76        "constructing_objects": null,
77        "index_of_element": null,
78        "checker_messages": null,
79        "environment": {
80          "pointer": "0x2",
81          "items": [
82            {
83              "location_context": "#0 Call",
84              "lctx_id": 3,
85              "calling": "foo",
86              "location": null,
87              "items": [
88                {
89                  "stmt_id": 9,
90                  "pretty": "baz()",
91                  "value": "Undefined"
92                }
93              ]
94            }
95          ]
96        }
97      }
98    }
99\l}"];
100
101Node0x6 -> Node0x9;
102// Make sure that the last node in the path is not diffed.
103// CHECK: Node0x9 [
104// CHECK-SAME: <tr>
105// CHECK-SAME:   <td></td>
106// CHECK-SAME:   <td align="left"><i>S9</i></td>
107// CHECK-SAME:   <td align="left">baz()</td>
108// CHECK-SAME:   <td align="left">Undefined</td>
109// CHECK-SAME: </tr>
110Node0x9 [shape=record,label=
111 "{
112    {
113      "state_id": 7,
114      "program_points": [
115        {
116          "kind": "BlockEntrance", "block_id": 1,
117          "terminator": null, "term_kind": null,
118          "tag": null, "node_id": 1,
119          "has_report": 0, "is_sink": 0
120        }
121      ],
122      "program_state": {
123        "store": null,
124        "constraints": null,
125        "dynamic_types": null,
126        "constructing_objects": null,
127        "index_of_element": null,
128        "checker_messages": null,
129        "environment": {
130          "pointer": "0x2",
131          "items": [
132            {
133              "location_context": "#0 Call",
134              "lctx_id": 3,
135              "calling": "foo",
136              "location": null,
137              "items": [
138                {
139                  "stmt_id": 9,
140                  "pretty": "baz()",
141                  "value": "Undefined"
142                }
143              ]
144            }
145          ]
146        }
147      }
148    }
149\l}"];
150