From c36cdcbde7686e9890640c079078fb40bef21435 Mon Sep 17 00:00:00 2001 From: RUSshy <18348637+RUSshy@users.noreply.github.com> Date: Fri, 6 Aug 2021 19:00:50 +0200 Subject: [PATCH] Added auto cast test --- tests/tc_auto_cast/expected.txt | 8 ++++++++ tests/tc_auto_cast/file.d | 1 + tests/tc_auto_cast/run.sh | 7 +++++++ 3 files changed, 16 insertions(+) create mode 100644 tests/tc_auto_cast/expected.txt create mode 100644 tests/tc_auto_cast/file.d create mode 100644 tests/tc_auto_cast/run.sh diff --git a/tests/tc_auto_cast/expected.txt b/tests/tc_auto_cast/expected.txt new file mode 100644 index 0000000..9327cec --- /dev/null +++ b/tests/tc_auto_cast/expected.txt @@ -0,0 +1,8 @@ +identifiers +alignof k +data v +init k +mangleof k +sizeof k +stringof k +tupleof k diff --git a/tests/tc_auto_cast/file.d b/tests/tc_auto_cast/file.d new file mode 100644 index 0000000..b2b8178 --- /dev/null +++ b/tests/tc_auto_cast/file.d @@ -0,0 +1 @@ +struct A { float data; } A a; auto ptr = cast(A*) &a; ptr. \ No newline at end of file diff --git a/tests/tc_auto_cast/run.sh b/tests/tc_auto_cast/run.sh new file mode 100644 index 0000000..61945af --- /dev/null +++ b/tests/tc_auto_cast/run.sh @@ -0,0 +1,7 @@ +set -e +set -u + + +../../bin/dcd-client $1 file.d -c 60 > actual.txt + +diff actual.txt expected.txt \ No newline at end of file