Added new simplified C + D tests. Removed straggling full test skeleton files.

This commit is contained in:
Steve King 2010-08-14 00:00:09 -07:00
commit fa00060dda
7 changed files with 21 additions and 422 deletions

View 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
View 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
View file

@ -0,0 +1,4 @@
int cfunc( int x )
{
return x + 1;
}