First small tests for llvmc2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50734 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mikhail Glushenkov 2008-05-06 17:24:54 +00:00
parent b96cb60827
commit 3c30e6c653
4 changed files with 34 additions and 0 deletions

3
test/LLVMC/dg.exp Normal file
View File

@ -0,0 +1,3 @@
load_lib llvm.exp
RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{c,cpp}]]

12
test/LLVMC/hello.c Normal file
View File

@ -0,0 +1,12 @@
/*
* Check that we can compile helloworld
* RUN: llvmc2 %s -o %t
* RUN: ./%t | grep hello
*/
#include <stdio.h>
int main() {
printf("hello\n");
return 0;
}

10
test/LLVMC/together.cpp Normal file
View File

@ -0,0 +1,10 @@
// Check that we can compile files of different types together.
// TOFIX: compiling files with same names should work.
// RUN: llvmc2 %s %p/together1.c -o %t
// RUN: ./%t | grep hello
extern "C" void test();
int main() {
test();
}

9
test/LLVMC/together1.c Normal file
View File

@ -0,0 +1,9 @@
/*
* RUN: ignore
*/
#include <stdio.h>
void test() {
printf("hello\n");
}