Added new simplified C + D tests. Removed straggling full test skeleton files.
This commit is contained in:
parent
02d13655b2
commit
fa00060dda
7 changed files with 21 additions and 422 deletions
7
tests/app_5/CMakeLists.txt
Normal file
7
tests/app_5/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This is a D app that links a C object.
|
||||
#
|
||||
# The linker preference of D is higher than C (or CXX), so after
|
||||
# the objects are created, the D toolchain will drive linking.
|
||||
#
|
||||
ADD_EXECUTABLE ( app_5 app_5.d cfunc.c )
|
||||
ADD_TEST( app_5 app_5 )
|
9
tests/app_5/app_5.d
Normal file
9
tests/app_5/app_5.d
Normal file
|
@ -0,0 +1,9 @@
|
|||
extern(C) int cfunc( int x );
|
||||
int main()
|
||||
{
|
||||
int x = 1;
|
||||
int y;
|
||||
y = cfunc(x);
|
||||
assert( y == x + 1 );
|
||||
return 0;
|
||||
}
|
4
tests/app_5/cfunc.c
Normal file
4
tests/app_5/cfunc.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
int cfunc( int x )
|
||||
{
|
||||
return x + 1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue