diff --git a/tests/tc_auto_cast/expected.txt b/tests/tc_auto_cast/expected.txt new file mode 100644 index 0000000..2774d5f --- /dev/null +++ b/tests/tc_auto_cast/expected.txt @@ -0,0 +1,2 @@ +identifiers +from_cast v C from_cast stdin 165 diff --git a/tests/tc_auto_cast/file.d b/tests/tc_auto_cast/file.d new file mode 100644 index 0000000..a1d7086 --- /dev/null +++ b/tests/tc_auto_cast/file.d @@ -0,0 +1,18 @@ +struct A +{ + struct B + { + struct C + { + int inside_c; + } + int inside_b; + } + int inside_a; +} + +void main() +{ + auto from_cast = cast(A.B.C) A(); + from_ca +} diff --git a/tests/tc_auto_cast/run.sh b/tests/tc_auto_cast/run.sh new file mode 100644 index 0000000..4404540 --- /dev/null +++ b/tests/tc_auto_cast/run.sh @@ -0,0 +1,5 @@ +set -e +set -u + +../../bin/dcd-client $1 file.d --extended -c154 > actual.txt +diff actual.txt expected.txt --strip-trailing-cr