From cc9f4f466a444616ee5e9e2375affe75c7fbf5ea Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 14 Jan 2009 01:34:13 +0000 Subject: [PATCH] ccc: Add hello.{cpp,m} tests. - 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 | 2 ++ tools/ccc/test/ccc/hello.cpp | 10 ++++++++++ tools/ccc/test/ccc/hello.m | 9 +++++++++ 3 files changed, 21 insertions(+) create mode 100644 tools/ccc/test/ccc/hello.cpp create mode 100644 tools/ccc/test/ccc/hello.m diff --git a/tools/ccc/test/ccc/hello.c b/tools/ccc/test/ccc/hello.c index 96f59f6747..9563fd04fe 100644 --- a/tools/ccc/test/ccc/hello.c +++ b/tools/ccc/test/ccc/hello.c @@ -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 index 0000000000..75c7bfd84e --- /dev/null +++ b/tools/ccc/test/ccc/hello.cpp @@ -0,0 +1,10 @@ +// RUN: xcc -ccc-cxx %s -o %t && +// RUN: %t | grep "Hello, World" +// XFAIL + +#include + +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 index 0000000000..9563fd04fe --- /dev/null +++ b/tools/ccc/test/ccc/hello.m @@ -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; +} -- 2.50.1