From: Daniel Dunbar Date: Wed, 14 Jan 2009 01:34:13 +0000 (+0000) Subject: ccc: Add hello.{cpp,m} tests. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc9f4f466a444616ee5e9e2375affe75c7fbf5ea;p=clang 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 --- 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; +}