From 78bd53d296735624c663cb1bf38f126f1cd46333 Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Tue, 9 Dec 2008 14:41:27 +0000 Subject: [PATCH] Add some rudimentary tests for . git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60766 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/LLVMC/clang_hello.c | 11 +++++++++++ test/LLVMC/clang_together.c | 13 +++++++++++++ test/LLVMC/test_data/clang_together.c | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 test/LLVMC/clang_hello.c create mode 100644 test/LLVMC/clang_together.c create mode 100644 test/LLVMC/test_data/clang_together.c diff --git a/test/LLVMC/clang_hello.c b/test/LLVMC/clang_hello.c new file mode 100644 index 00000000000..b72ec5d7226 --- /dev/null +++ b/test/LLVMC/clang_hello.c @@ -0,0 +1,11 @@ +/* + * Test basic functionality of llvmc -clang + * + * RUN: llvmc -clang %s -o %t + * RUN: ./%t | grep {Hello Clang} + */ + +int main() { + printf("Hello Clang world!\n"); + return 0; +} diff --git a/test/LLVMC/clang_together.c b/test/LLVMC/clang_together.c new file mode 100644 index 00000000000..de5099591b8 --- /dev/null +++ b/test/LLVMC/clang_together.c @@ -0,0 +1,13 @@ +/* + * Test that `llvmc -clang` can link multiple files + * + * RUN: llvmc -clang %s %p/test_data/clang_together.c -o %t + * RUN: ./%t | grep {Hello Clang} + */ + +void f(); + +int main() { + f(); + return 0; +} diff --git a/test/LLVMC/test_data/clang_together.c b/test/LLVMC/test_data/clang_together.c new file mode 100644 index 00000000000..8f57f531829 --- /dev/null +++ b/test/LLVMC/test_data/clang_together.c @@ -0,0 +1,3 @@ +void f() { + printf("Hello Clang world!\n"); +}