From 0cc3543c2beed8a37179dae63c0cd3860f7f0446 Mon Sep 17 00:00:00 2001 From: Stefan Koch Date: Thu, 1 Mar 2018 16:43:21 +0100 Subject: [PATCH] Add tests --- tests/allman/issue0237.d.ref | 40 ++++++++++++++++++++++++++++++++++++ tests/issue0237.d | 22 ++++++++++++++++++++ tests/otbs/issue0237.d.ref | 36 ++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 tests/allman/issue0237.d.ref create mode 100644 tests/issue0237.d create mode 100644 tests/otbs/issue0237.d.ref diff --git a/tests/allman/issue0237.d.ref b/tests/allman/issue0237.d.ref new file mode 100644 index 0000000..7d91255 --- /dev/null +++ b/tests/allman/issue0237.d.ref @@ -0,0 +1,40 @@ +void fn() +{ + { + { + { + auto file = { + "integrationtest/feed/etc/config.iniaasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "etc/config.ini" + }; + { + int x; + } + } + } + } +} + +struct A +{ + int x, y, z; +} + +int main() +{ + int fun() + { + import std.stdio : writeln; + import std.typecons : tuple; + + A a = { + tuple(Variant(1))[0].get!int, tuple(Variant(2))[0].get!int, + tuple(Variant(3))[0].get!int + }; + A b = { + tuple(Variant(1))[0].get!int, tuple(Variant(2))[0].get!int, + tuple(Variant(3))[0].get!int + }; + writeln(a); + } +} diff --git a/tests/issue0237.d b/tests/issue0237.d new file mode 100644 index 0000000..3de4fea --- /dev/null +++ b/tests/issue0237.d @@ -0,0 +1,22 @@ +void fn () {{{{ +auto file = +{ "integrationtest/feed/etc/config.iniaasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", +"etc/config.ini" }; +{ int x; } +}}}} +struct A +{ + int x, y, z; +} + +int main() +{ + int fun() + { + import std.stdio : writeln; + import std.typecons : tuple; + A a = { tuple(Variant(1))[0].get!int, tuple(Variant(2))[0].get!int, tuple(Variant(3))[0].get!int }; + A b = { tuple(Variant(1))[0].get!int, tuple(Variant(2))[0].get!int, tuple(Variant(3))[0].get!int }; + writeln(a); + } +} diff --git a/tests/otbs/issue0237.d.ref b/tests/otbs/issue0237.d.ref new file mode 100644 index 0000000..08848ae --- /dev/null +++ b/tests/otbs/issue0237.d.ref @@ -0,0 +1,36 @@ +void fn() { + { + { + { + auto file = { + "integrationtest/feed/etc/config.iniaasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "etc/config.ini" + }; + { + int x; + } + } + } + } +} + +struct A { + int x, y, z; +} + +int main() { + int fun() { + import std.stdio : writeln; + import std.typecons : tuple; + + A a = { + tuple(Variant(1))[0].get!int, tuple(Variant(2))[0].get!int, + tuple(Variant(3))[0].get!int + }; + A b = { + tuple(Variant(1))[0].get!int, tuple(Variant(2))[0].get!int, + tuple(Variant(3))[0].get!int + }; + writeln(a); + } +}