From ab82590bb6e82c26449af6369558475033555924 Mon Sep 17 00:00:00 2001 From: antlord Date: Sat, 30 Jul 2016 22:51:43 +0800 Subject: [PATCH] tests have been corrected --- tests/tc038/excplicit_array.d | 2 ++ tests/tc038/expected1.txt | 5 +++-- tests/tc038/expected2.txt | 12 ------------ tests/tc038/file.d | 3 --- tests/tc038/implicit_array.d | 2 ++ tests/tc038/implicit_var.d | 2 ++ tests/tc038/run.sh | 8 ++++---- 7 files changed, 13 insertions(+), 21 deletions(-) create mode 100644 tests/tc038/excplicit_array.d delete mode 100644 tests/tc038/expected2.txt delete mode 100644 tests/tc038/file.d create mode 100644 tests/tc038/implicit_array.d create mode 100644 tests/tc038/implicit_var.d diff --git a/tests/tc038/excplicit_array.d b/tests/tc038/excplicit_array.d new file mode 100644 index 0000000..ae902ab --- /dev/null +++ b/tests/tc038/excplicit_array.d @@ -0,0 +1,2 @@ +struct pair { int a; int b; }; +pair func(){ return pair(); } int main() { auto var = func(); var. } diff --git a/tests/tc038/expected1.txt b/tests/tc038/expected1.txt index 9a132a4..551a093 100644 --- a/tests/tc038/expected1.txt +++ b/tests/tc038/expected1.txt @@ -1,8 +1,9 @@ identifiers +a v alignof k +b v init k mangleof k -max k -min k sizeof k stringof k +tupleof k diff --git a/tests/tc038/expected2.txt b/tests/tc038/expected2.txt deleted file mode 100644 index c7f4f34..0000000 --- a/tests/tc038/expected2.txt +++ /dev/null @@ -1,12 +0,0 @@ -identifiers -alignof k -dup k -idup k -init k -length k -mangleof k -ptr k -reverse k -sizeof k -sort k -stringof k diff --git a/tests/tc038/file.d b/tests/tc038/file.d deleted file mode 100644 index 87025ba..0000000 --- a/tests/tc038/file.d +++ /dev/null @@ -1,3 +0,0 @@ -int[] func(){ return [1,2]; } int main() { auto arr = func(); arr[0]. } -int[] func(){ return [1,2]; } int main() { int[] arr = func(); arr[0]. } -struct pair { int a; int b; }; pair func(){ return pair(); } int main() { auto var = func(); var. } diff --git a/tests/tc038/implicit_array.d b/tests/tc038/implicit_array.d new file mode 100644 index 0000000..c6fa5ee --- /dev/null +++ b/tests/tc038/implicit_array.d @@ -0,0 +1,2 @@ +struct pair { int a; int b; }; +pair[] func(){ return [pair(1,2)]; } int main() { auto arr = func(); arr[0]. } diff --git a/tests/tc038/implicit_var.d b/tests/tc038/implicit_var.d new file mode 100644 index 0000000..c6fa5ee --- /dev/null +++ b/tests/tc038/implicit_var.d @@ -0,0 +1,2 @@ +struct pair { int a; int b; }; +pair[] func(){ return [pair(1,2)]; } int main() { auto arr = func(); arr[0]. } diff --git a/tests/tc038/run.sh b/tests/tc038/run.sh index 723802b..a57b860 100755 --- a/tests/tc038/run.sh +++ b/tests/tc038/run.sh @@ -1,11 +1,11 @@ set -e set -u -../../bin/dcd-client $1 file.d -c70 > actual.txt +../../bin/dcd-client $1 implicit_array.d -c108 > actual.txt diff actual.txt expected1.txt -../../bin/dcd-client $1 file.d -c143 > actual.txt +../../bin/dcd-client $1 excplicit_array.d -c98 > actual.txt diff actual.txt expected1.txt -../../bin/dcd-client $1 file.d -c242 > actual.txt -diff actual.txt expected2.txt +../../bin/dcd-client $1 implicit_var.d -c108 > actual.txt +diff actual.txt expected1.txt