From 991040491c62134558546fe799332dea4240cac0 Mon Sep 17 00:00:00 2001 From: RUSshy <18348637+RUSshy@users.noreply.github.com> Date: Tue, 31 Aug 2021 16:52:57 +0200 Subject: [PATCH] Update test to cover crash case --- tests/tc_auto_variable/expected_crash_return_auto.txt | 4 ++++ tests/tc_auto_variable/file_crash_return_auto.d | 1 + tests/tc_auto_variable/run.sh | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 tests/tc_auto_variable/expected_crash_return_auto.txt create mode 100644 tests/tc_auto_variable/file_crash_return_auto.d diff --git a/tests/tc_auto_variable/expected_crash_return_auto.txt b/tests/tc_auto_variable/expected_crash_return_auto.txt new file mode 100644 index 0000000..fc704f0 --- /dev/null +++ b/tests/tc_auto_variable/expected_crash_return_auto.txt @@ -0,0 +1,4 @@ +identifiers +data v weird data stdin 55 +dchar k +double k diff --git a/tests/tc_auto_variable/file_crash_return_auto.d b/tests/tc_auto_variable/file_crash_return_auto.d new file mode 100644 index 0000000..8f2fe88 --- /dev/null +++ b/tests/tc_auto_variable/file_crash_return_auto.d @@ -0,0 +1 @@ +struct MyData{} auto weird(){ return MyData(); }; auto data = weird(); d \ No newline at end of file diff --git a/tests/tc_auto_variable/run.sh b/tests/tc_auto_variable/run.sh index ffe8a9f..430cc01 100644 --- a/tests/tc_auto_variable/run.sh +++ b/tests/tc_auto_variable/run.sh @@ -6,3 +6,6 @@ diff actual.txt expected.txt ../../bin/dcd-client $1 --extended file_nf.d -c58 > actual_nf.txt diff actual_nf.txt expected_nf.txt + +../../bin/dcd-client $1 --extended file_crash_return_auto.d -c72 > actual_crash_return_auto.txt +diff actual_crash_return_auto.txt expected_crash_return_auto.txt