summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-13 01:36:19 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-13 01:36:19 +0000
commit7262bafe985c686633079e3a019ab3b85f15a610 (patch)
tree76335978c016b44c081282a7748909f580df75a2 /test
parent2a52122b304045e73a4a174259ffcde772e33040 (diff)
downloadllvm-7262bafe985c686633079e3a019ab3b85f15a610.tar.gz
llvm-7262bafe985c686633079e3a019ab3b85f15a610.tar.bz2
llvm-7262bafe985c686633079e3a019ab3b85f15a610.tar.xz
Simplify LLVMC tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/LLVMC/dash-x.cpp (renamed from test/LLVMC/false.c)0
-rw-r--r--test/LLVMC/llvmc.exp12
-rw-r--r--test/LLVMC/test_data/false.c10
3 files changed, 12 insertions, 10 deletions
diff --git a/test/LLVMC/false.c b/test/LLVMC/dash-x.cpp
index eb2883d699..eb2883d699 100644
--- a/test/LLVMC/false.c
+++ b/test/LLVMC/dash-x.cpp
diff --git a/test/LLVMC/llvmc.exp b/test/LLVMC/llvmc.exp
index fd5a0466ad..f33e24381d 100644
--- a/test/LLVMC/llvmc.exp
+++ b/test/LLVMC/llvmc.exp
@@ -1,19 +1,11 @@
load_lib llvm.exp
-# 'false.c' is really C++, so it must be treated differently.
-set special_file "$srcdir/$subdir/false.c"
-
if [ llvm_gcc_supports c ] then {
- # tcl seems to lack 'filter' which would've made this easier...
- set temp [glob -nocomplain $srcdir/$subdir/*.{c}]
- set c_files [list]
- foreach f $temp { if {$f != $special_file} {lappend c_files $f}}
-
- RunLLVMTests [lsort $c_files]
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{c}]]
}
if [ llvm_gcc_supports c++ ] then {
- RunLLVMTests [lsort [concat [glob -nocomplain $srcdir/$subdir/*.{cpp}] $special_file]]
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{cpp}]]
}
if [ llvm_gcc_supports objc ] then {
diff --git a/test/LLVMC/test_data/false.c b/test/LLVMC/test_data/false.c
new file mode 100644
index 0000000000..98842fe311
--- /dev/null
+++ b/test/LLVMC/test_data/false.c
@@ -0,0 +1,10 @@
+#include <iostream>
+
+extern "C" void test();
+extern std::string test2();
+
+int main() {
+ std::cout << "h";
+ test();
+ std::cout << test2() << '\n';
+}