mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Add tests
This commit is contained in:
parent
e535f0b2b0
commit
0cc3543c2b
3 changed files with 98 additions and 0 deletions
40
tests/allman/issue0237.d.ref
Normal file
40
tests/allman/issue0237.d.ref
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
22
tests/issue0237.d
Normal file
22
tests/issue0237.d
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
36
tests/otbs/issue0237.d.ref
Normal file
36
tests/otbs/issue0237.d.ref
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue