[llvm-commits] [llvm] r81659 - in /llvm/trunk/test/LLVMC: dash-x.cpp false.c llvmc.exp test_data/false.c
Daniel Dunbar
daniel at zuster.org
Sat Sep 12 18:36:19 PDT 2009
Author: ddunbar
Date: Sat Sep 12 20:36:19 2009
New Revision: 81659
URL: http://llvm.org/viewvc/llvm-project?rev=81659&view=rev
Log:
Simplify LLVMC tests.
Added:
llvm/trunk/test/LLVMC/dash-x.cpp
- copied, changed from r81658, llvm/trunk/test/LLVMC/false.c
llvm/trunk/test/LLVMC/test_data/false.c
Removed:
llvm/trunk/test/LLVMC/false.c
Modified:
llvm/trunk/test/LLVMC/llvmc.exp
Copied: llvm/trunk/test/LLVMC/dash-x.cpp (from r81658, llvm/trunk/test/LLVMC/false.c)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/dash-x.cpp?p2=llvm/trunk/test/LLVMC/dash-x.cpp&p1=llvm/trunk/test/LLVMC/false.c&r1=81658&r2=81659&rev=81659&view=diff
==============================================================================
(empty)
Removed: llvm/trunk/test/LLVMC/false.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/false.c?rev=81658&view=auto
==============================================================================
--- llvm/trunk/test/LLVMC/false.c (original)
+++ llvm/trunk/test/LLVMC/false.c (removed)
@@ -1,14 +0,0 @@
-// Test that we can compile .c files as C++ and vice versa
-// RUN: llvmc -x c++ %s -x c %p/test_data/false.cpp -x lisp -x whatnot -x none %p/test_data/false2.cpp -o %t
-// RUN: ./%t | grep hello
-
-#include <iostream>
-
-extern "C" void test();
-extern std::string test2();
-
-int main() {
- std::cout << "h";
- test();
- std::cout << test2() << '\n';
-}
Modified: llvm/trunk/test/LLVMC/llvmc.exp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/llvmc.exp?rev=81659&r1=81658&r2=81659&view=diff
==============================================================================
--- llvm/trunk/test/LLVMC/llvmc.exp (original)
+++ llvm/trunk/test/LLVMC/llvmc.exp Sat Sep 12 20:36:19 2009
@@ -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 {
Added: llvm/trunk/test/LLVMC/test_data/false.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/test_data/false.c?rev=81659&view=auto
==============================================================================
--- llvm/trunk/test/LLVMC/test_data/false.c (added)
+++ llvm/trunk/test/LLVMC/test_data/false.c Sat Sep 12 20:36:19 2009
@@ -0,0 +1,10 @@
+#include <iostream>
+
+extern "C" void test();
+extern std::string test2();
+
+int main() {
+ std::cout << "h";
+ test();
+ std::cout << test2() << '\n';
+}
More information about the llvm-commits
mailing list