diff --git a/tests/ast-parsing/compile/user_defined_types.sol-0.8.10-compact.zip b/tests/ast-parsing/compile/user_defined_types.sol-0.8.10-compact.zip deleted file mode 100644 index 245529e6b..000000000 Binary files a/tests/ast-parsing/compile/user_defined_types.sol-0.8.10-compact.zip and /dev/null differ diff --git a/tests/ast-parsing/compile/user_defined_types.sol-0.8.11-compact.zip b/tests/ast-parsing/compile/user_defined_types.sol-0.8.11-compact.zip deleted file mode 100644 index e89687d2b..000000000 Binary files a/tests/ast-parsing/compile/user_defined_types.sol-0.8.11-compact.zip and /dev/null differ diff --git a/tests/ast-parsing/compile/user_defined_types.sol-0.8.12-compact.zip b/tests/ast-parsing/compile/user_defined_types.sol-0.8.12-compact.zip deleted file mode 100644 index d58afe780..000000000 Binary files a/tests/ast-parsing/compile/user_defined_types.sol-0.8.12-compact.zip and /dev/null differ diff --git a/tests/ast-parsing/compile/user_defined_types.sol-0.8.8-compact.zip b/tests/ast-parsing/compile/user_defined_types.sol-0.8.8-compact.zip deleted file mode 100644 index 36924b8c2..000000000 Binary files a/tests/ast-parsing/compile/user_defined_types.sol-0.8.8-compact.zip and /dev/null differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.10-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.10-compact.zip new file mode 100644 index 000000000..a1d4b0919 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.11-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.11-compact.zip new file mode 100644 index 000000000..5b0bfc860 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.11-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.12-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.12-compact.zip new file mode 100644 index 000000000..c4be608bc Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.13-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.13-compact.zip new file mode 100644 index 000000000..56841fbaf Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.13-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.14-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.14-compact.zip new file mode 100644 index 000000000..131c5769e Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.14-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.15-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.15-compact.zip new file mode 100644 index 000000000..f8bdf9dee Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.15-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.8-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.8-compact.zip new file mode 100644 index 000000000..a74b49ac1 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/argument-0.8.8.sol-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.10-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.10-compact.zip new file mode 100644 index 000000000..57273022f Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.11-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.11-compact.zip new file mode 100644 index 000000000..c69a936a3 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.11-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.12-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.12-compact.zip new file mode 100644 index 000000000..277036849 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.13-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.13-compact.zip new file mode 100644 index 000000000..b17496fc4 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.13-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.14-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.14-compact.zip new file mode 100644 index 000000000..fa8734b4e Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.14-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.15-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.15-compact.zip new file mode 100644 index 000000000..a43ca6b0f Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.15-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.8-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.8-compact.zip new file mode 100644 index 000000000..4b98a2bc6 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/calldata-0.8.8.sol-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.10-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.10-compact.zip new file mode 100644 index 000000000..4f7e800b1 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.11-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.11-compact.zip new file mode 100644 index 000000000..24b01b8df Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.11-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.12-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.12-compact.zip new file mode 100644 index 000000000..43f760749 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.13-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.13-compact.zip new file mode 100644 index 000000000..647d124a4 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.13-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.14-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.14-compact.zip new file mode 100644 index 000000000..50f2cc275 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.14-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.15-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.15-compact.zip new file mode 100644 index 000000000..652617a3d Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.15-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.8-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.8-compact.zip new file mode 100644 index 000000000..d98aa7751 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/constant-0.8.8.sol-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.10-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.10-compact.zip new file mode 100644 index 000000000..c65376963 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.11-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.11-compact.zip new file mode 100644 index 000000000..51e60eb27 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.11-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.12-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.12-compact.zip new file mode 100644 index 000000000..c9e8559cd Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.13-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.13-compact.zip new file mode 100644 index 000000000..36b5e0143 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.13-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.14-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.14-compact.zip new file mode 100644 index 000000000..a0d3a394b Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.14-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.15-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.15-compact.zip new file mode 100644 index 000000000..41dd2566c Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.15-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.8-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.8-compact.zip new file mode 100644 index 000000000..1752e6322 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/erc20-0.8.8.sol-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.10-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.10-compact.zip new file mode 100644 index 000000000..0d3ca25a0 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.11-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.11-compact.zip new file mode 100644 index 000000000..ec8b66df7 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.11-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.12-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.12-compact.zip new file mode 100644 index 000000000..a9f8231db Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.13-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.13-compact.zip new file mode 100644 index 000000000..65636b54f Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.13-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.14-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.14-compact.zip new file mode 100644 index 000000000..aaff7aec6 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.14-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.15-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.15-compact.zip new file mode 100644 index 000000000..b9272ba0c Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.15-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.8-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.8-compact.zip new file mode 100644 index 000000000..56b368c60 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.10-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.10-compact.zip new file mode 100644 index 000000000..89a626934 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.10-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.11-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.11-compact.zip new file mode 100644 index 000000000..b261726c8 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.11-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.12-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.12-compact.zip new file mode 100644 index 000000000..751c2cf7c Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.12-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.13-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.13-compact.zip new file mode 100644 index 000000000..3c05dbea0 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.13-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.14-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.14-compact.zip new file mode 100644 index 000000000..366277c68 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.14-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.15-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.15-compact.zip new file mode 100644 index 000000000..04156bb2a Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.15-compact.zip differ diff --git a/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.8-compact.zip b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.8-compact.zip new file mode 100644 index 000000000..658877ed7 Binary files /dev/null and b/tests/ast-parsing/compile/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.8-compact.zip differ diff --git a/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.10-compact.json b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.10-compact.json new file mode 100644 index 000000000..cb45a229a --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.10-compact.json @@ -0,0 +1,7 @@ +{ + "FixLib": { + "div(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "works(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "test(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.11-compact.json b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.11-compact.json new file mode 100644 index 000000000..cb45a229a --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.11-compact.json @@ -0,0 +1,7 @@ +{ + "FixLib": { + "div(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "works(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "test(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.12-compact.json b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.12-compact.json new file mode 100644 index 000000000..cb45a229a --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.12-compact.json @@ -0,0 +1,7 @@ +{ + "FixLib": { + "div(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "works(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "test(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.13-compact.json b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.13-compact.json new file mode 100644 index 000000000..cb45a229a --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.13-compact.json @@ -0,0 +1,7 @@ +{ + "FixLib": { + "div(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "works(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "test(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.14-compact.json b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.14-compact.json new file mode 100644 index 000000000..cb45a229a --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.14-compact.json @@ -0,0 +1,7 @@ +{ + "FixLib": { + "div(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "works(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "test(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.15-compact.json b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.15-compact.json new file mode 100644 index 000000000..cb45a229a --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.15-compact.json @@ -0,0 +1,7 @@ +{ + "FixLib": { + "div(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "works(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "test(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.8-compact.json b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.8-compact.json new file mode 100644 index 000000000..cb45a229a --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/argument-0.8.8.sol-0.8.8-compact.json @@ -0,0 +1,7 @@ +{ + "FixLib": { + "div(uint256,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "works(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "test(Fix)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.10-compact.json b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.10-compact.json new file mode 100644 index 000000000..3ebff8630 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.10-compact.json @@ -0,0 +1,10 @@ +{ + "C": { + "f(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "g(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "test_f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: RETURN 7\n\"];\n}\n", + "test_g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: RETURN 10\n\"];\n}\n", + "clean()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "test_equality(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.11-compact.json b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.11-compact.json new file mode 100644 index 000000000..3ebff8630 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.11-compact.json @@ -0,0 +1,10 @@ +{ + "C": { + "f(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "g(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "test_f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: RETURN 7\n\"];\n}\n", + "test_g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: RETURN 10\n\"];\n}\n", + "clean()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "test_equality(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.12-compact.json b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.12-compact.json new file mode 100644 index 000000000..3ebff8630 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.12-compact.json @@ -0,0 +1,10 @@ +{ + "C": { + "f(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "g(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "test_f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: RETURN 7\n\"];\n}\n", + "test_g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: RETURN 10\n\"];\n}\n", + "clean()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "test_equality(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.13-compact.json b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.13-compact.json new file mode 100644 index 000000000..3ebff8630 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.13-compact.json @@ -0,0 +1,10 @@ +{ + "C": { + "f(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "g(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "test_f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: RETURN 7\n\"];\n}\n", + "test_g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: RETURN 10\n\"];\n}\n", + "clean()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "test_equality(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.14-compact.json b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.14-compact.json new file mode 100644 index 000000000..3ebff8630 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.14-compact.json @@ -0,0 +1,10 @@ +{ + "C": { + "f(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "g(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "test_f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: RETURN 7\n\"];\n}\n", + "test_g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: RETURN 10\n\"];\n}\n", + "clean()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "test_equality(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.15-compact.json b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.15-compact.json new file mode 100644 index 000000000..3ebff8630 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.15-compact.json @@ -0,0 +1,10 @@ +{ + "C": { + "f(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "g(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "test_f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: RETURN 7\n\"];\n}\n", + "test_g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: RETURN 10\n\"];\n}\n", + "clean()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "test_equality(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.8-compact.json b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.8-compact.json new file mode 100644 index 000000000..3ebff8630 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/calldata-0.8.8.sol-0.8.8-compact.json @@ -0,0 +1,10 @@ +{ + "C": { + "f(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "g(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->3;\n1[label=\"Node Type: BEGIN_LOOP 1\n\"];\n1->4;\n2[label=\"Node Type: END_LOOP 2\n\"];\n2->7;\n3[label=\"Node Type: NEW VARIABLE 3\n\"];\n3->1;\n4[label=\"Node Type: IF_LOOP 4\n\"];\n4->5[label=\"True\"];\n4->2[label=\"False\"];\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->4;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n}\n", + "test_f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: RETURN 7\n\"];\n}\n", + "test_g()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: NEW VARIABLE 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n4->5;\n5[label=\"Node Type: EXPRESSION 5\n\"];\n5->6;\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->8;\n8[label=\"Node Type: EXPRESSION 8\n\"];\n8->9;\n9[label=\"Node Type: EXPRESSION 9\n\"];\n9->10;\n10[label=\"Node Type: RETURN 10\n\"];\n}\n", + "clean()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "test_equality(MyAddress[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->4;\n2[label=\"Node Type: BEGIN_LOOP 2\n\"];\n2->5;\n3[label=\"Node Type: END_LOOP 3\n\"];\n4[label=\"Node Type: NEW VARIABLE 4\n\"];\n4->2;\n5[label=\"Node Type: IF_LOOP 5\n\"];\n5->6[label=\"True\"];\n5->3[label=\"False\"];\n6[label=\"Node Type: EXPRESSION 6\n\"];\n6->7;\n7[label=\"Node Type: EXPRESSION 7\n\"];\n7->5;\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.10-compact.json b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.10-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.10-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.11-compact.json b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.11-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.11-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.12-compact.json b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.12-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.12-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.13-compact.json b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.13-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.13-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.14-compact.json b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.14-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.14-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.15-compact.json b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.15-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.15-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.8-compact.json b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.8-compact.json new file mode 100644 index 000000000..0008a4469 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/constant-0.8.8.sol-0.8.8-compact.json @@ -0,0 +1,3 @@ +{ + "C": {} +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.10-compact.json b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.10-compact.json new file mode 100644 index 000000000..d8c9a5943 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.10-compact.json @@ -0,0 +1,22 @@ +{ + "FixedMath": { + "add(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "sub(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "ERC20": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "totalSupply()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "allowance(address,address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "transfer(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "approve(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "transferFrom(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "increaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "decreaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "_transfer(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_mint(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burn(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_approve(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burnFrom(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.11-compact.json b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.11-compact.json new file mode 100644 index 000000000..d8c9a5943 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.11-compact.json @@ -0,0 +1,22 @@ +{ + "FixedMath": { + "add(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "sub(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "ERC20": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "totalSupply()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "allowance(address,address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "transfer(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "approve(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "transferFrom(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "increaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "decreaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "_transfer(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_mint(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burn(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_approve(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burnFrom(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.12-compact.json b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.12-compact.json new file mode 100644 index 000000000..d8c9a5943 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.12-compact.json @@ -0,0 +1,22 @@ +{ + "FixedMath": { + "add(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "sub(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "ERC20": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "totalSupply()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "allowance(address,address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "transfer(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "approve(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "transferFrom(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "increaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "decreaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "_transfer(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_mint(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burn(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_approve(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burnFrom(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.13-compact.json b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.13-compact.json new file mode 100644 index 000000000..d8c9a5943 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.13-compact.json @@ -0,0 +1,22 @@ +{ + "FixedMath": { + "add(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "sub(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "ERC20": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "totalSupply()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "allowance(address,address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "transfer(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "approve(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "transferFrom(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "increaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "decreaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "_transfer(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_mint(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burn(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_approve(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burnFrom(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.14-compact.json b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.14-compact.json new file mode 100644 index 000000000..d8c9a5943 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.14-compact.json @@ -0,0 +1,22 @@ +{ + "FixedMath": { + "add(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "sub(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "ERC20": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "totalSupply()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "allowance(address,address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "transfer(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "approve(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "transferFrom(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "increaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "decreaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "_transfer(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_mint(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burn(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_approve(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burnFrom(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.15-compact.json b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.15-compact.json new file mode 100644 index 000000000..d8c9a5943 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.15-compact.json @@ -0,0 +1,22 @@ +{ + "FixedMath": { + "add(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "sub(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "ERC20": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "totalSupply()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "allowance(address,address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "transfer(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "approve(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "transferFrom(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "increaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "decreaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "_transfer(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_mint(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burn(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_approve(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burnFrom(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.8-compact.json b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.8-compact.json new file mode 100644 index 000000000..d8c9a5943 --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/erc20-0.8.8.sol-0.8.8-compact.json @@ -0,0 +1,22 @@ +{ + "FixedMath": { + "add(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "sub(UFixed18,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "ERC20": { + "constructor()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n}\n", + "totalSupply()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "balanceOf(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "allowance(address,address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "transfer(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "approve(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "transferFrom(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: RETURN 3\n\"];\n}\n", + "increaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "decreaseAllowance(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", + "_transfer(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_mint(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burn(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_approve(address,address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n", + "_burnFrom(address,UFixed18)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.10-compact.json b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.10-compact.json new file mode 100644 index 000000000..272a4265d --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.10-compact.json @@ -0,0 +1,14 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + }, + "FixedMath": { + "add(UFixed,UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "mul(UFixed,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "floor(UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "toUFixed(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "Greeter": { + "constructor(string)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.11-compact.json b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.11-compact.json new file mode 100644 index 000000000..272a4265d --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.11-compact.json @@ -0,0 +1,14 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + }, + "FixedMath": { + "add(UFixed,UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "mul(UFixed,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "floor(UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "toUFixed(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "Greeter": { + "constructor(string)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.12-compact.json b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.12-compact.json new file mode 100644 index 000000000..272a4265d --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.12-compact.json @@ -0,0 +1,14 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + }, + "FixedMath": { + "add(UFixed,UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "mul(UFixed,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "floor(UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "toUFixed(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "Greeter": { + "constructor(string)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.13-compact.json b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.13-compact.json new file mode 100644 index 000000000..272a4265d --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.13-compact.json @@ -0,0 +1,14 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + }, + "FixedMath": { + "add(UFixed,UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "mul(UFixed,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "floor(UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "toUFixed(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "Greeter": { + "constructor(string)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.14-compact.json b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.14-compact.json new file mode 100644 index 000000000..272a4265d --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.14-compact.json @@ -0,0 +1,14 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + }, + "FixedMath": { + "add(UFixed,UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "mul(UFixed,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "floor(UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "toUFixed(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "Greeter": { + "constructor(string)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.15-compact.json b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.15-compact.json new file mode 100644 index 000000000..272a4265d --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.15-compact.json @@ -0,0 +1,14 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + }, + "FixedMath": { + "add(UFixed,UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "mul(UFixed,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "floor(UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "toUFixed(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "Greeter": { + "constructor(string)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.8-compact.json b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.8-compact.json new file mode 100644 index 000000000..272a4265d --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/in_parenthesis-0.8.8.sol-0.8.8-compact.json @@ -0,0 +1,14 @@ +{ + "C": { + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: EXPRESSION 1\n\"];\n1->2;\n2[label=\"Node Type: EXPRESSION 2\n\"];\n2->3;\n3[label=\"Node Type: EXPRESSION 3\n\"];\n3->4;\n4[label=\"Node Type: EXPRESSION 4\n\"];\n}\n" + }, + "FixedMath": { + "add(UFixed,UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "mul(UFixed,uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "floor(UFixed)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", + "toUFixed(uint256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + }, + "Greeter": { + "constructor(string)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.10-compact.json b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.10-compact.json new file mode 100644 index 000000000..06367c7cd --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.10-compact.json @@ -0,0 +1,10 @@ +{ + "B": { + "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + }, + "D": {}, + "C": { + "f(Left[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.11-compact.json b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.11-compact.json new file mode 100644 index 000000000..06367c7cd --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.11-compact.json @@ -0,0 +1,10 @@ +{ + "B": { + "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + }, + "D": {}, + "C": { + "f(Left[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.12-compact.json b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.12-compact.json new file mode 100644 index 000000000..06367c7cd --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.12-compact.json @@ -0,0 +1,10 @@ +{ + "B": { + "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + }, + "D": {}, + "C": { + "f(Left[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.13-compact.json b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.13-compact.json new file mode 100644 index 000000000..06367c7cd --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.13-compact.json @@ -0,0 +1,10 @@ +{ + "B": { + "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + }, + "D": {}, + "C": { + "f(Left[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.14-compact.json b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.14-compact.json new file mode 100644 index 000000000..06367c7cd --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.14-compact.json @@ -0,0 +1,10 @@ +{ + "B": { + "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + }, + "D": {}, + "C": { + "f(Left[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.15-compact.json b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.15-compact.json new file mode 100644 index 000000000..06367c7cd --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.15-compact.json @@ -0,0 +1,10 @@ +{ + "B": { + "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + }, + "D": {}, + "C": { + "f(Left[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.8-compact.json b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.8-compact.json new file mode 100644 index 000000000..06367c7cd --- /dev/null +++ b/tests/ast-parsing/expected/user_defined_value_type/user_defined_types-0.8.8.sol-0.8.8-compact.json @@ -0,0 +1,10 @@ +{ + "B": { + "u()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n", + "f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" + }, + "D": {}, + "C": { + "f(Left[])": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" + } +} \ No newline at end of file diff --git a/tests/ast-parsing/user_defined_value_type/argument-0.8.9.sol b/tests/ast-parsing/user_defined_value_type/argument-0.8.8.sol similarity index 94% rename from tests/ast-parsing/user_defined_value_type/argument-0.8.9.sol rename to tests/ast-parsing/user_defined_value_type/argument-0.8.8.sol index 55fe237e1..8d511db7a 100644 --- a/tests/ast-parsing/user_defined_value_type/argument-0.8.9.sol +++ b/tests/ast-parsing/user_defined_value_type/argument-0.8.8.sol @@ -1,5 +1,3 @@ -pragma solidity ^0.8.9; - type Fix is int192; diff --git a/tests/ast-parsing/user_defined_value_type/calldata-0.8.9.sol b/tests/ast-parsing/user_defined_value_type/calldata-0.8.8.sol similarity index 98% rename from tests/ast-parsing/user_defined_value_type/calldata-0.8.9.sol rename to tests/ast-parsing/user_defined_value_type/calldata-0.8.8.sol index b69e2e0d6..dff2146e8 100644 --- a/tests/ast-parsing/user_defined_value_type/calldata-0.8.9.sol +++ b/tests/ast-parsing/user_defined_value_type/calldata-0.8.8.sol @@ -1,4 +1,3 @@ -pragma solidity ^0.8.9; pragma abicoder v2; type MyAddress is address; diff --git a/tests/ast-parsing/user_defined_value_type/constant-0.8.9.sol b/tests/ast-parsing/user_defined_value_type/constant-0.8.8.sol similarity index 89% rename from tests/ast-parsing/user_defined_value_type/constant-0.8.9.sol rename to tests/ast-parsing/user_defined_value_type/constant-0.8.8.sol index 70b395441..0ea1e5df8 100644 --- a/tests/ast-parsing/user_defined_value_type/constant-0.8.9.sol +++ b/tests/ast-parsing/user_defined_value_type/constant-0.8.8.sol @@ -1,5 +1,5 @@ type T is int224; -pragma solidity ^0.8.9; + contract C { T constant public s = T.wrap(int224(165521356710917456517261742455526507355687727119203895813322792776)); T constant public t = s; diff --git a/tests/ast-parsing/user_defined_value_type/erc20.sol b/tests/ast-parsing/user_defined_value_type/erc20-0.8.8.sol similarity index 100% rename from tests/ast-parsing/user_defined_value_type/erc20.sol rename to tests/ast-parsing/user_defined_value_type/erc20-0.8.8.sol diff --git a/tests/ast-parsing/user_defined_value_type/in_parenthesis-0.8.8.sol b/tests/ast-parsing/user_defined_value_type/in_parenthesis-0.8.8.sol new file mode 100644 index 000000000..739221fb9 --- /dev/null +++ b/tests/ast-parsing/user_defined_value_type/in_parenthesis-0.8.8.sol @@ -0,0 +1,48 @@ +type MyInt is int; +contract C { + function f() public returns (MyInt a, int b) { + (MyInt).wrap; + a = (MyInt).wrap(5); + (MyInt).unwrap; + b = (MyInt).unwrap((MyInt).wrap(10)); + } +} + +// Represent a 18 decimal, 256 bit wide fixed point type +// using a user defined value type. +type UFixed is uint256; + +/// A minimal library to do fixed point operations on UFixed. +library FixedMath { + uint constant multiplier = 10**18; + + /// Adds two UFixed numbers. Reverts on overflow, + /// relying on checked arithmetic on uint256. + function add(UFixed a, UFixed b) internal pure returns (UFixed) { + return UFixed.wrap(UFixed.unwrap(a) + UFixed.unwrap(b)); + } + /// Multiplies UFixed and uint256. Reverts on overflow, + /// relying on checked arithmetic on uint256. + function mul(UFixed a, uint256 b) internal pure returns (UFixed) { + return UFixed.wrap(UFixed.unwrap(a) * b); + } + /// Take the floor of a UFixed number. + /// @return the largest integer that does not exceed `a`. + function floor(UFixed a) internal pure returns (uint256) { + return UFixed.unwrap(a) / multiplier; + } + /// Turns a uint256 into a UFixed of the same value. + /// Reverts if the integer is too large. + function toUFixed(uint256 a) internal pure returns (UFixed) { + return UFixed.wrap(a * multiplier); + } +} + + +contract Greeter { + using FixedMath for UFixed; + UFixed public someValue; + + constructor(string memory _greeting) { + } +} diff --git a/tests/ast-parsing/user_defined_value_type/in_parenthesis.sol b/tests/ast-parsing/user_defined_value_type/in_parenthesis.sol deleted file mode 100644 index d45dacb4f..000000000 --- a/tests/ast-parsing/user_defined_value_type/in_parenthesis.sol +++ /dev/null @@ -1,9 +0,0 @@ -type MyInt is int; -contract C { - function f() public returns (MyInt a, int b) { - (MyInt).wrap; - a = (MyInt).wrap(5); - (MyInt).unwrap; - b = (MyInt).unwrap((MyInt).wrap(10)); - } -} diff --git a/tests/ast-parsing/user_defined_types.sol b/tests/ast-parsing/user_defined_value_type/user_defined_types-0.8.8.sol similarity index 100% rename from tests/ast-parsing/user_defined_types.sol rename to tests/ast-parsing/user_defined_value_type/user_defined_types-0.8.8.sol diff --git a/tests/test_ast_parsing.py b/tests/test_ast_parsing.py index eafe6a2f3..0b791f0ea 100644 --- a/tests/test_ast_parsing.py +++ b/tests/test_ast_parsing.py @@ -402,7 +402,14 @@ ALL_TESTS = [ Test("custom_error_with_state_variable.sol", make_version(8, 4, 12)), Test("complex_imports/import_aliases/test.sol", VERSIONS_08), # 0.8.9 crashes on our testcase - Test("user_defined_types.sol", ["0.8.8"] + make_version(8, 10, 12)), + Test( + "user_defined_value_type/user_defined_types-0.8.8.sol", ["0.8.8"] + make_version(8, 10, 15) + ), + Test("user_defined_value_type/argument-0.8.8.sol", ["0.8.8"] + make_version(8, 10, 15)), + Test("user_defined_value_type/calldata-0.8.8.sol", ["0.8.8"] + make_version(8, 10, 15)), + Test("user_defined_value_type/constant-0.8.8.sol", ["0.8.8"] + make_version(8, 10, 15)), + Test("user_defined_value_type/erc20-0.8.8.sol", ["0.8.8"] + make_version(8, 10, 15)), + Test("user_defined_value_type/in_parenthesis-0.8.8.sol", ["0.8.8"] + make_version(8, 10, 15)), Test("bytes_call.sol", ["0.8.12"]), ] # create the output folder if needed