diff --git a/.gitignore b/.gitignore index 486996cc..166e4c3d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ lol* .idea* coverage_html_report/ .coverage +tests/testdata/outputs_current/ diff --git a/README_DEV.md b/README_DEV.md index bd507ab3..9c4ffa50 100644 --- a/README_DEV.md +++ b/README_DEV.md @@ -52,6 +52,12 @@ pip3 install -r requirements.txt It may cost you about 3 minutes to run all the tests. +The tests may save their outputs content to `./tests/testdata/outputs_current/`, you can compare the files between it and `./tests/testdata/outputs_expected/` to see the difference if there is any changes. + +If you think the changes are expected, you can just copy them to `outputs_expected` and commit them as new expected outputs. + +The `./tests/testdata/outputs_current/` directory is deleted and recreated in `all_tests.sh` and `coverage_report.sh` each time. + ### Generating test coverage report ```bash diff --git a/all_tests.sh b/all_tests.sh index a398a2bd..63c80eb5 100755 --- a/all_tests.sh +++ b/all_tests.sh @@ -1,3 +1,5 @@ #!/bin/sh +rm -rf ./tests/testdata/outputs_current/ +mkdir -p ./tests/testdata/outputs_current/ python3 -m unittest discover -p "*_test.py" diff --git a/coverage_report.sh b/coverage_report.sh index 90ca0a8f..c81b661d 100755 --- a/coverage_report.sh +++ b/coverage_report.sh @@ -1,6 +1,9 @@ #!/bin/sh +rm -rf ./tests/testdata/outputs_current/ +mkdir -p ./tests/testdata/outputs_current/ rm -rf coverage_html_report + coverage run -m unittest discover -p "*_test.py" coverage html open coverage_html_report/index.html diff --git a/tests/__init__.py b/tests/__init__.py index d7e92230..acd15889 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -5,6 +5,10 @@ TESTS_DIR = Path(__file__).parent PROJECT_DIR = TESTS_DIR.parent TESTDATA = TESTS_DIR / "testdata" TESTDATA_INPUTS = TESTDATA / "inputs" -TESTDATA_OUTPUTS = TESTDATA / "outputs" +TESTDATA_OUTPUTS_EXPECTED = TESTDATA / "outputs_expected" +TESTDATA_OUTPUTS_CURRENT = TESTDATA / "outputs_current" os.environ['MYTHRIL_DIR'] = str(TESTS_DIR / "mythril_dir") + +def compare_files_error_message(expected, current): + return "Expected output changes, compare the following files to see differences: \n- {}\n- {}\n".format(str(expected), str(current)) diff --git a/tests/disassembler_test.py b/tests/disassembler_test.py index 505a81ef..38da2148 100644 --- a/tests/disassembler_test.py +++ b/tests/disassembler_test.py @@ -18,12 +18,12 @@ class DisassemblerTestCase(TestCase): def test_easm_from_solidity_files(self): for input_file in TESTDATA_INPUTS.iterdir(): - code = _compile_to_code(input_file) + output_expected = TESTDATA_OUTPUTS_EXPECTED / (input_file.name + ".easm") + output_current = TESTDATA_OUTPUTS_CURRENT / (input_file.name + ".easm") + code = _compile_to_code(input_file) disassembly = Disassembly(code) - # Useful for generating output file - # (TESTDATA_OUTPUTS / (input_file.name + ".easm")).write_text(disassembly.get_easm()) + output_current.write_text(disassembly.get_easm()) - expected_easm = (TESTDATA_OUTPUTS / (input_file.name + ".easm")).read_text() - self.assertEqual(disassembly.get_easm(), expected_easm, "{} returns invalid easm".format(str(input_file))) + self.assertEqual(output_expected.read_text(), output_current.read_text(), compare_files_error_message(output_expected, output_current)) diff --git a/tests/graph_test.py b/tests/graph_test.py index 95b1cf0f..2c2f59ed 100644 --- a/tests/graph_test.py +++ b/tests/graph_test.py @@ -1,8 +1,6 @@ from unittest import TestCase from mythril.analysis.callgraph import generate_graph -from mythril.analysis.report import Report -from mythril.analysis.security import fire_lasers from mythril.analysis.symbolic import SymExecWrapper from mythril.ether import util from mythril.ether.soliditycontract import SolidityContract @@ -12,21 +10,13 @@ class GraphTest(TestCase): def test_generate_graph(self): for input_file in TESTDATA_INPUTS.iterdir(): + output_expected = TESTDATA_OUTPUTS_EXPECTED / (input_file.name + ".graph.html") + output_current = TESTDATA_OUTPUTS_CURRENT / (input_file.name + ".graph.html") + contract = SolidityContract(str(input_file), name=None, solc_args=None) sym = SymExecWrapper(contract, address=(util.get_indexed_address(0))) - issues = fire_lasers(sym) - - for issue in issues: - issue.add_code_info(contract) - - report = Report() - for issue in issues: - report.append_issue(issue) html = generate_graph(sym) + output_current.write_text(html) - # Useful for generating output file - # (TESTDATA_OUTPUTS / (input_file.name + ".graph.html")).write_text(html) - - expected = (TESTDATA_OUTPUTS / (input_file.name + ".graph.html")).read_text() - self.assertEqual(html, expected, "{}: graph html is changed".format(str(input_file))) + self.assertEqual(output_expected.read_text(), output_current.read_text(), compare_files_error_message(output_expected, output_current)) diff --git a/tests/report_test.py b/tests/report_test.py index 71da79fe..41d93eb6 100644 --- a/tests/report_test.py +++ b/tests/report_test.py @@ -5,6 +5,7 @@ from mythril.analysis.security import fire_lasers from mythril.analysis.symbolic import SymExecWrapper from mythril.ether import util from mythril.ether.soliditycontract import SolidityContract + import json from tests import * @@ -17,30 +18,49 @@ def _fix_debug_data(json_str): issue["debug"] = "" return json.dumps(read_json, indent=4) +def _generate_report(input_file): + contract = SolidityContract(str(input_file), name=None, solc_args=None) + sym = SymExecWrapper(contract, address=(util.get_indexed_address(0))) + issues = fire_lasers(sym) + + report = Report() + for issue in issues: + issue.add_code_info(contract) + report.append_issue(issue) + + return report + class AnalysisReportTest(TestCase): - def test_reports(self): - for input_file in (TESTDATA / "inputs").iterdir(): - contract = SolidityContract(str(input_file), name=None, solc_args=None) - sym = SymExecWrapper(contract, address=(util.get_indexed_address(0))) - issues = fire_lasers(sym) + def test_json_reports(self): + for input_file in TESTDATA_INPUTS.iterdir(): + output_expected = TESTDATA_OUTPUTS_EXPECTED / (input_file.name + ".json") + output_current = TESTDATA_OUTPUTS_CURRENT / (input_file.name + ".json") + + report = _generate_report(input_file) + + output_current.write_text(_fix_path(_fix_debug_data(report.as_json())).strip()) + + self.assertEqual(output_expected.read_text(), output_expected.read_text(), compare_files_error_message(output_expected, output_current)) + + def test_markdown_reports(self): + for input_file in TESTDATA_INPUTS.iterdir(): + output_expected = TESTDATA_OUTPUTS_EXPECTED / (input_file.name + ".markdown") + output_current = TESTDATA_OUTPUTS_CURRENT / (input_file.name + ".markdown") + + report = _generate_report(input_file) + + output_current.write_text(_fix_path(report.as_markdown())) - for issue in issues: - issue.add_code_info(contract) + self.assertEqual(output_expected.read_text(), output_current.read_text(), compare_files_error_message(output_expected, output_current)) - report = Report() - for issue in issues: - report.append_issue(issue) + def test_text_reports(self): + for input_file in TESTDATA_INPUTS.iterdir(): + output_expected = TESTDATA_OUTPUTS_EXPECTED / (input_file.name + ".text") + output_current = TESTDATA_OUTPUTS_CURRENT / (input_file.name + ".text") - # Useful for generating output file - # (TESTDATA_OUTPUTS / (input_file.name + ".text")).write_text(_fix_path(report.as_text())) - # (TESTDATA_OUTPUTS / (input_file.name + ".json")).write_text(_fix_path(_fix_debug_data(report.as_json()))) - # (TESTDATA_OUTPUTS / (input_file.name + ".markdown")).write_text(_fix_path(report.as_markdown())) + report = _generate_report(input_file) - text = (TESTDATA / "outputs" / (input_file.name + ".text")).read_text() - json_report = (TESTDATA / "outputs" / (input_file.name + ".json")).read_text() - markdown = (TESTDATA / "outputs" / (input_file.name + ".markdown")).read_text() + output_current.write_text(_fix_path(report.as_text())) - self.assertEqual(_fix_path(report.as_text()), text, "{}: text report is changed".format(str(input_file))) - self.assertEqual(_fix_path(report.as_markdown()), markdown, "{}: markdown report is changed".format(str(input_file))) - self.assertEqual(_fix_path(_fix_debug_data(report.as_json())).strip(), json_report.strip(), "{}: json report is changed".format(str(input_file))) + self.assertEqual(output_expected.read_text(), output_current.read_text(), compare_files_error_message(output_expected, output_current)) diff --git a/tests/testdata/outputs/calls.sol.easm b/tests/testdata/outputs_expected/calls.sol.easm similarity index 100% rename from tests/testdata/outputs/calls.sol.easm rename to tests/testdata/outputs_expected/calls.sol.easm diff --git a/tests/testdata/outputs/calls.sol.graph.html b/tests/testdata/outputs_expected/calls.sol.graph.html similarity index 100% rename from tests/testdata/outputs/calls.sol.graph.html rename to tests/testdata/outputs_expected/calls.sol.graph.html diff --git a/tests/testdata/outputs/calls.sol.json b/tests/testdata/outputs_expected/calls.sol.json similarity index 100% rename from tests/testdata/outputs/calls.sol.json rename to tests/testdata/outputs_expected/calls.sol.json diff --git a/tests/testdata/outputs/calls.sol.markdown b/tests/testdata/outputs_expected/calls.sol.markdown similarity index 100% rename from tests/testdata/outputs/calls.sol.markdown rename to tests/testdata/outputs_expected/calls.sol.markdown diff --git a/tests/testdata/outputs/calls.sol.text b/tests/testdata/outputs_expected/calls.sol.text similarity index 100% rename from tests/testdata/outputs/calls.sol.text rename to tests/testdata/outputs_expected/calls.sol.text diff --git a/tests/testdata/outputs/ether_send.sol.easm b/tests/testdata/outputs_expected/ether_send.sol.easm similarity index 100% rename from tests/testdata/outputs/ether_send.sol.easm rename to tests/testdata/outputs_expected/ether_send.sol.easm diff --git a/tests/testdata/outputs/ether_send.sol.graph.html b/tests/testdata/outputs_expected/ether_send.sol.graph.html similarity index 100% rename from tests/testdata/outputs/ether_send.sol.graph.html rename to tests/testdata/outputs_expected/ether_send.sol.graph.html diff --git a/tests/testdata/outputs/ether_send.sol.json b/tests/testdata/outputs_expected/ether_send.sol.json similarity index 100% rename from tests/testdata/outputs/ether_send.sol.json rename to tests/testdata/outputs_expected/ether_send.sol.json diff --git a/tests/testdata/outputs/ether_send.sol.markdown b/tests/testdata/outputs_expected/ether_send.sol.markdown similarity index 100% rename from tests/testdata/outputs/ether_send.sol.markdown rename to tests/testdata/outputs_expected/ether_send.sol.markdown diff --git a/tests/testdata/outputs/ether_send.sol.text b/tests/testdata/outputs_expected/ether_send.sol.text similarity index 100% rename from tests/testdata/outputs/ether_send.sol.text rename to tests/testdata/outputs_expected/ether_send.sol.text diff --git a/tests/testdata/outputs/exceptions.sol.easm b/tests/testdata/outputs_expected/exceptions.sol.easm similarity index 100% rename from tests/testdata/outputs/exceptions.sol.easm rename to tests/testdata/outputs_expected/exceptions.sol.easm diff --git a/tests/testdata/outputs/exceptions.sol.graph.html b/tests/testdata/outputs_expected/exceptions.sol.graph.html similarity index 100% rename from tests/testdata/outputs/exceptions.sol.graph.html rename to tests/testdata/outputs_expected/exceptions.sol.graph.html diff --git a/tests/testdata/outputs/exceptions.sol.json b/tests/testdata/outputs_expected/exceptions.sol.json similarity index 100% rename from tests/testdata/outputs/exceptions.sol.json rename to tests/testdata/outputs_expected/exceptions.sol.json diff --git a/tests/testdata/outputs/exceptions.sol.markdown b/tests/testdata/outputs_expected/exceptions.sol.markdown similarity index 100% rename from tests/testdata/outputs/exceptions.sol.markdown rename to tests/testdata/outputs_expected/exceptions.sol.markdown diff --git a/tests/testdata/outputs/exceptions.sol.text b/tests/testdata/outputs_expected/exceptions.sol.text similarity index 100% rename from tests/testdata/outputs/exceptions.sol.text rename to tests/testdata/outputs_expected/exceptions.sol.text diff --git a/tests/testdata/outputs/kinds_of_calls.sol.easm b/tests/testdata/outputs_expected/kinds_of_calls.sol.easm similarity index 100% rename from tests/testdata/outputs/kinds_of_calls.sol.easm rename to tests/testdata/outputs_expected/kinds_of_calls.sol.easm diff --git a/tests/testdata/outputs/kinds_of_calls.sol.graph.html b/tests/testdata/outputs_expected/kinds_of_calls.sol.graph.html similarity index 100% rename from tests/testdata/outputs/kinds_of_calls.sol.graph.html rename to tests/testdata/outputs_expected/kinds_of_calls.sol.graph.html diff --git a/tests/testdata/outputs/kinds_of_calls.sol.json b/tests/testdata/outputs_expected/kinds_of_calls.sol.json similarity index 100% rename from tests/testdata/outputs/kinds_of_calls.sol.json rename to tests/testdata/outputs_expected/kinds_of_calls.sol.json diff --git a/tests/testdata/outputs/kinds_of_calls.sol.markdown b/tests/testdata/outputs_expected/kinds_of_calls.sol.markdown similarity index 100% rename from tests/testdata/outputs/kinds_of_calls.sol.markdown rename to tests/testdata/outputs_expected/kinds_of_calls.sol.markdown diff --git a/tests/testdata/outputs/kinds_of_calls.sol.text b/tests/testdata/outputs_expected/kinds_of_calls.sol.text similarity index 100% rename from tests/testdata/outputs/kinds_of_calls.sol.text rename to tests/testdata/outputs_expected/kinds_of_calls.sol.text diff --git a/tests/testdata/outputs/metacoin.sol.easm b/tests/testdata/outputs_expected/metacoin.sol.easm similarity index 100% rename from tests/testdata/outputs/metacoin.sol.easm rename to tests/testdata/outputs_expected/metacoin.sol.easm diff --git a/tests/testdata/outputs/metacoin.sol.graph.html b/tests/testdata/outputs_expected/metacoin.sol.graph.html similarity index 100% rename from tests/testdata/outputs/metacoin.sol.graph.html rename to tests/testdata/outputs_expected/metacoin.sol.graph.html diff --git a/tests/testdata/outputs/metacoin.sol.json b/tests/testdata/outputs_expected/metacoin.sol.json similarity index 100% rename from tests/testdata/outputs/metacoin.sol.json rename to tests/testdata/outputs_expected/metacoin.sol.json diff --git a/tests/testdata/outputs/metacoin.sol.markdown b/tests/testdata/outputs_expected/metacoin.sol.markdown similarity index 100% rename from tests/testdata/outputs/metacoin.sol.markdown rename to tests/testdata/outputs_expected/metacoin.sol.markdown diff --git a/tests/testdata/outputs/metacoin.sol.text b/tests/testdata/outputs_expected/metacoin.sol.text similarity index 100% rename from tests/testdata/outputs/metacoin.sol.text rename to tests/testdata/outputs_expected/metacoin.sol.text diff --git a/tests/testdata/outputs/multi_contracts.sol.easm b/tests/testdata/outputs_expected/multi_contracts.sol.easm similarity index 100% rename from tests/testdata/outputs/multi_contracts.sol.easm rename to tests/testdata/outputs_expected/multi_contracts.sol.easm diff --git a/tests/testdata/outputs/multi_contracts.sol.graph.html b/tests/testdata/outputs_expected/multi_contracts.sol.graph.html similarity index 100% rename from tests/testdata/outputs/multi_contracts.sol.graph.html rename to tests/testdata/outputs_expected/multi_contracts.sol.graph.html diff --git a/tests/testdata/outputs/multi_contracts.sol.json b/tests/testdata/outputs_expected/multi_contracts.sol.json similarity index 100% rename from tests/testdata/outputs/multi_contracts.sol.json rename to tests/testdata/outputs_expected/multi_contracts.sol.json diff --git a/tests/testdata/outputs/multi_contracts.sol.markdown b/tests/testdata/outputs_expected/multi_contracts.sol.markdown similarity index 100% rename from tests/testdata/outputs/multi_contracts.sol.markdown rename to tests/testdata/outputs_expected/multi_contracts.sol.markdown diff --git a/tests/testdata/outputs/multi_contracts.sol.text b/tests/testdata/outputs_expected/multi_contracts.sol.text similarity index 100% rename from tests/testdata/outputs/multi_contracts.sol.text rename to tests/testdata/outputs_expected/multi_contracts.sol.text diff --git a/tests/testdata/outputs/origin.sol.easm b/tests/testdata/outputs_expected/origin.sol.easm similarity index 100% rename from tests/testdata/outputs/origin.sol.easm rename to tests/testdata/outputs_expected/origin.sol.easm diff --git a/tests/testdata/outputs/origin.sol.graph.html b/tests/testdata/outputs_expected/origin.sol.graph.html similarity index 100% rename from tests/testdata/outputs/origin.sol.graph.html rename to tests/testdata/outputs_expected/origin.sol.graph.html diff --git a/tests/testdata/outputs/origin.sol.json b/tests/testdata/outputs_expected/origin.sol.json similarity index 100% rename from tests/testdata/outputs/origin.sol.json rename to tests/testdata/outputs_expected/origin.sol.json diff --git a/tests/testdata/outputs/origin.sol.markdown b/tests/testdata/outputs_expected/origin.sol.markdown similarity index 100% rename from tests/testdata/outputs/origin.sol.markdown rename to tests/testdata/outputs_expected/origin.sol.markdown diff --git a/tests/testdata/outputs/origin.sol.text b/tests/testdata/outputs_expected/origin.sol.text similarity index 100% rename from tests/testdata/outputs/origin.sol.text rename to tests/testdata/outputs_expected/origin.sol.text diff --git a/tests/testdata/outputs/returnvalue.sol.easm b/tests/testdata/outputs_expected/returnvalue.sol.easm similarity index 100% rename from tests/testdata/outputs/returnvalue.sol.easm rename to tests/testdata/outputs_expected/returnvalue.sol.easm diff --git a/tests/testdata/outputs/returnvalue.sol.graph.html b/tests/testdata/outputs_expected/returnvalue.sol.graph.html similarity index 100% rename from tests/testdata/outputs/returnvalue.sol.graph.html rename to tests/testdata/outputs_expected/returnvalue.sol.graph.html diff --git a/tests/testdata/outputs/returnvalue.sol.json b/tests/testdata/outputs_expected/returnvalue.sol.json similarity index 100% rename from tests/testdata/outputs/returnvalue.sol.json rename to tests/testdata/outputs_expected/returnvalue.sol.json diff --git a/tests/testdata/outputs/returnvalue.sol.markdown b/tests/testdata/outputs_expected/returnvalue.sol.markdown similarity index 100% rename from tests/testdata/outputs/returnvalue.sol.markdown rename to tests/testdata/outputs_expected/returnvalue.sol.markdown diff --git a/tests/testdata/outputs/returnvalue.sol.text b/tests/testdata/outputs_expected/returnvalue.sol.text similarity index 100% rename from tests/testdata/outputs/returnvalue.sol.text rename to tests/testdata/outputs_expected/returnvalue.sol.text diff --git a/tests/testdata/outputs/rubixi.sol.easm b/tests/testdata/outputs_expected/rubixi.sol.easm similarity index 100% rename from tests/testdata/outputs/rubixi.sol.easm rename to tests/testdata/outputs_expected/rubixi.sol.easm diff --git a/tests/testdata/outputs/rubixi.sol.graph.html b/tests/testdata/outputs_expected/rubixi.sol.graph.html similarity index 100% rename from tests/testdata/outputs/rubixi.sol.graph.html rename to tests/testdata/outputs_expected/rubixi.sol.graph.html diff --git a/tests/testdata/outputs/rubixi.sol.json b/tests/testdata/outputs_expected/rubixi.sol.json similarity index 100% rename from tests/testdata/outputs/rubixi.sol.json rename to tests/testdata/outputs_expected/rubixi.sol.json diff --git a/tests/testdata/outputs/rubixi.sol.markdown b/tests/testdata/outputs_expected/rubixi.sol.markdown similarity index 100% rename from tests/testdata/outputs/rubixi.sol.markdown rename to tests/testdata/outputs_expected/rubixi.sol.markdown diff --git a/tests/testdata/outputs/rubixi.sol.text b/tests/testdata/outputs_expected/rubixi.sol.text similarity index 100% rename from tests/testdata/outputs/rubixi.sol.text rename to tests/testdata/outputs_expected/rubixi.sol.text diff --git a/tests/testdata/outputs/suicide.sol.easm b/tests/testdata/outputs_expected/suicide.sol.easm similarity index 100% rename from tests/testdata/outputs/suicide.sol.easm rename to tests/testdata/outputs_expected/suicide.sol.easm diff --git a/tests/testdata/outputs/suicide.sol.graph.html b/tests/testdata/outputs_expected/suicide.sol.graph.html similarity index 100% rename from tests/testdata/outputs/suicide.sol.graph.html rename to tests/testdata/outputs_expected/suicide.sol.graph.html diff --git a/tests/testdata/outputs/suicide.sol.json b/tests/testdata/outputs_expected/suicide.sol.json similarity index 100% rename from tests/testdata/outputs/suicide.sol.json rename to tests/testdata/outputs_expected/suicide.sol.json diff --git a/tests/testdata/outputs/suicide.sol.markdown b/tests/testdata/outputs_expected/suicide.sol.markdown similarity index 100% rename from tests/testdata/outputs/suicide.sol.markdown rename to tests/testdata/outputs_expected/suicide.sol.markdown diff --git a/tests/testdata/outputs/suicide.sol.text b/tests/testdata/outputs_expected/suicide.sol.text similarity index 100% rename from tests/testdata/outputs/suicide.sol.text rename to tests/testdata/outputs_expected/suicide.sol.text diff --git a/tests/testdata/outputs/underflow.sol.easm b/tests/testdata/outputs_expected/underflow.sol.easm similarity index 100% rename from tests/testdata/outputs/underflow.sol.easm rename to tests/testdata/outputs_expected/underflow.sol.easm diff --git a/tests/testdata/outputs/underflow.sol.graph.html b/tests/testdata/outputs_expected/underflow.sol.graph.html similarity index 100% rename from tests/testdata/outputs/underflow.sol.graph.html rename to tests/testdata/outputs_expected/underflow.sol.graph.html diff --git a/tests/testdata/outputs/underflow.sol.json b/tests/testdata/outputs_expected/underflow.sol.json similarity index 100% rename from tests/testdata/outputs/underflow.sol.json rename to tests/testdata/outputs_expected/underflow.sol.json diff --git a/tests/testdata/outputs/underflow.sol.markdown b/tests/testdata/outputs_expected/underflow.sol.markdown similarity index 100% rename from tests/testdata/outputs/underflow.sol.markdown rename to tests/testdata/outputs_expected/underflow.sol.markdown diff --git a/tests/testdata/outputs/underflow.sol.text b/tests/testdata/outputs_expected/underflow.sol.text similarity index 100% rename from tests/testdata/outputs/underflow.sol.text rename to tests/testdata/outputs_expected/underflow.sol.text diff --git a/tests/testdata/outputs/weak_random.sol.easm b/tests/testdata/outputs_expected/weak_random.sol.easm similarity index 100% rename from tests/testdata/outputs/weak_random.sol.easm rename to tests/testdata/outputs_expected/weak_random.sol.easm diff --git a/tests/testdata/outputs/weak_random.sol.graph.html b/tests/testdata/outputs_expected/weak_random.sol.graph.html similarity index 100% rename from tests/testdata/outputs/weak_random.sol.graph.html rename to tests/testdata/outputs_expected/weak_random.sol.graph.html diff --git a/tests/testdata/outputs/weak_random.sol.json b/tests/testdata/outputs_expected/weak_random.sol.json similarity index 100% rename from tests/testdata/outputs/weak_random.sol.json rename to tests/testdata/outputs_expected/weak_random.sol.json diff --git a/tests/testdata/outputs/weak_random.sol.markdown b/tests/testdata/outputs_expected/weak_random.sol.markdown similarity index 100% rename from tests/testdata/outputs/weak_random.sol.markdown rename to tests/testdata/outputs_expected/weak_random.sol.markdown diff --git a/tests/testdata/outputs/weak_random.sol.text b/tests/testdata/outputs_expected/weak_random.sol.text similarity index 100% rename from tests/testdata/outputs/weak_random.sol.text rename to tests/testdata/outputs_expected/weak_random.sol.text