]> granicus.if.org Git - clang/commitdiff
ccc: Add hello.{cpp,m} tests.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 14 Jan 2009 01:34:13 +0000 (01:34 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 14 Jan 2009 01:34:13 +0000 (01:34 +0000)
 - hello.cpp is XFAIL pending g++ emulation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62208 91177308-0d34-0410-b5e6-96231b3b80d8

tools/ccc/test/ccc/hello.c
tools/ccc/test/ccc/hello.cpp [new file with mode: 0644]
tools/ccc/test/ccc/hello.m [new file with mode: 0644]

index 96f59f6747c63f8b09e92d5bdb3797cb5157ad55..9563fd04fe01ac613f1de3acfeda8ce8fcb21a94 100644 (file)
@@ -1,4 +1,6 @@
 // RUN: xcc %s -o %t &&
+// RUN: %t | grep "Hello, World" &&
+// RUN: xcc -ccc-clang %s -o %t &&
 // RUN: %t | grep "Hello, World"
 
 int main() {
diff --git a/tools/ccc/test/ccc/hello.cpp b/tools/ccc/test/ccc/hello.cpp
new file mode 100644 (file)
index 0000000..75c7bfd
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: xcc -ccc-cxx %s -o %t &&
+// RUN: %t | grep "Hello, World"
+// XFAIL
+
+#include <iostream>
+
+int main() {
+  std::cout << "Hello, World!\n";
+  return 0;
+}
diff --git a/tools/ccc/test/ccc/hello.m b/tools/ccc/test/ccc/hello.m
new file mode 100644 (file)
index 0000000..9563fd0
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: xcc %s -o %t &&
+// RUN: %t | grep "Hello, World" &&
+// RUN: xcc -ccc-clang %s -o %t &&
+// RUN: %t | grep "Hello, World"
+
+int main() {
+  printf("Hello, World!\n");
+  return 0;
+}