mirror of
https://github.com/dlang-community/DCD.git
synced 2025-04-28 14:19:55 +03:00
Test cases for struct constructors
This commit is contained in:
parent
57b9f3d3b6
commit
ffe2e78896
4 changed files with 41 additions and 0 deletions
7
tests/tc019/expected1.txt
Normal file
7
tests/tc019/expected1.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
identifiers
|
||||||
|
alignof k
|
||||||
|
init k
|
||||||
|
mangleof k
|
||||||
|
sizeof k
|
||||||
|
stringof k
|
||||||
|
tupleof k
|
2
tests/tc019/expected2.txt
Normal file
2
tests/tc019/expected2.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
calltips
|
||||||
|
this(int a, int c)
|
24
tests/tc019/file.d
Normal file
24
tests/tc019/file.d
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
struct B
|
||||||
|
{
|
||||||
|
int a;
|
||||||
|
void b();
|
||||||
|
int c;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct A
|
||||||
|
{
|
||||||
|
this()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
A.
|
||||||
|
}
|
||||||
|
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
auto b = B(
|
||||||
|
}
|
8
tests/tc019/run.sh
Executable file
8
tests/tc019/run.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
../../bin/dcd-client file.d -c84 > actual1.txt
|
||||||
|
diff actual1.txt expected1.txt
|
||||||
|
|
||||||
|
../../bin/dcd-client file.d -c111 > actual2.txt
|
||||||
|
diff actual2.txt expected2.txt
|
Loading…
Add table
Add a link
Reference in a new issue