From 33fd0db07d7924ece72f9eb80e36777eab5e8dc7 Mon Sep 17 00:00:00 2001 From: ryuukk Date: Fri, 17 Feb 2023 21:37:32 +0100 Subject: [PATCH] added test for #717 --- tests/tc717/expected.txt | 8 ++++++++ tests/tc717/file.d | 15 +++++++++++++++ tests/tc717/run.sh | 5 +++++ 3 files changed, 28 insertions(+) create mode 100644 tests/tc717/expected.txt create mode 100644 tests/tc717/file.d create mode 100755 tests/tc717/run.sh diff --git a/tests/tc717/expected.txt b/tests/tc717/expected.txt new file mode 100644 index 0000000..bfc6075 --- /dev/null +++ b/tests/tc717/expected.txt @@ -0,0 +1,8 @@ +identifiers +alignof k +init k +mangleof k +max k +min k +sizeof k +stringof k diff --git a/tests/tc717/file.d b/tests/tc717/file.d new file mode 100644 index 0000000..4e98341 --- /dev/null +++ b/tests/tc717/file.d @@ -0,0 +1,15 @@ +struct A +{ + B b; + + void test() + { + auto here = b.inside_b; + here. + } +} + +struct B +{ + int inside_b; +} \ No newline at end of file diff --git a/tests/tc717/run.sh b/tests/tc717/run.sh new file mode 100755 index 0000000..3499a67 --- /dev/null +++ b/tests/tc717/run.sh @@ -0,0 +1,5 @@ +set -e +set -u + +../../bin/dcd-client $1 file.d --extended -c88 > actual.txt +diff actual.txt expected.txt --strip-trailing-cr