From 19d95a536c4dccb7ddfb19f4b364bd8953978299 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sun, 13 Sep 2009 01:36:19 +0000 Subject: [PATCH] Simplify LLVMC tests. llvm-svn: 81659 --- test/LLVMC/{false.c => dash-x.cpp} | 0 test/LLVMC/llvmc.exp | 12 ++---------- test/LLVMC/test_data/false.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 10 deletions(-) rename test/LLVMC/{false.c => dash-x.cpp} (100%) create mode 100644 test/LLVMC/test_data/false.c diff --git a/test/LLVMC/false.c b/test/LLVMC/dash-x.cpp similarity index 100% rename from test/LLVMC/false.c rename to test/LLVMC/dash-x.cpp diff --git a/test/LLVMC/llvmc.exp b/test/LLVMC/llvmc.exp index fd5a0466ad8..f33e24381d1 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 00000000000..98842fe311e --- /dev/null +++ b/test/LLVMC/test_data/false.c @@ -0,0 +1,10 @@ +#include + +extern "C" void test(); +extern std::string test2(); + +int main() { + std::cout << "h"; + test(); + std::cout << test2() << '\n'; +}