[libcxxabi] r245531 - Fix or disable C++11 tests in C++03 mode
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 19 18:22:18 PDT 2015
Author: ericwf
Date: Wed Aug 19 20:22:17 2015
New Revision: 245531
URL: http://llvm.org/viewvc/llvm-project?rev=245531&view=rev
Log:
Fix or disable C++11 tests in C++03 mode
Modified:
libcxxabi/trunk/test/catch_in_noexcept.pass.cpp
libcxxabi/trunk/test/catch_pointer_nullptr.pass.cpp
libcxxabi/trunk/test/catch_ptr_02.pass.cpp
libcxxabi/trunk/test/dynamic_cast_stress.pass.cpp
Modified: libcxxabi/trunk/test/catch_in_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_in_noexcept.pass.cpp?rev=245531&r1=245530&r2=245531&view=diff
==============================================================================
--- libcxxabi/trunk/test/catch_in_noexcept.pass.cpp (original)
+++ libcxxabi/trunk/test/catch_in_noexcept.pass.cpp Wed Aug 19 20:22:17 2015
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
#include <exception>
#include <stdlib.h>
#include <assert.h>
Modified: libcxxabi/trunk/test/catch_pointer_nullptr.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_pointer_nullptr.pass.cpp?rev=245531&r1=245530&r2=245531&view=diff
==============================================================================
--- libcxxabi/trunk/test/catch_pointer_nullptr.pass.cpp (original)
+++ libcxxabi/trunk/test/catch_pointer_nullptr.pass.cpp Wed Aug 19 20:22:17 2015
@@ -7,17 +7,13 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
#include <cassert>
#include <cstdlib>
-#ifndef __has_feature
-#define __has_feature(x) 0
-#endif
-
struct A {};
-#if __has_feature(cxx_nullptr)
-
void test1()
{
try
@@ -62,22 +58,6 @@ void catch_nullptr_test() {
}
}
-#else
-
-void test1()
-{
-}
-
-void test2()
-{
-}
-
-template <class Catch>
-void catch_nullptr_test()
-{
-}
-
-#endif
int main()
{
Modified: libcxxabi/trunk/test/catch_ptr_02.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_ptr_02.pass.cpp?rev=245531&r1=245530&r2=245531&view=diff
==============================================================================
--- libcxxabi/trunk/test/catch_ptr_02.pass.cpp (original)
+++ libcxxabi/trunk/test/catch_ptr_02.pass.cpp Wed Aug 19 20:22:17 2015
@@ -9,6 +9,10 @@
#include <cassert>
+#if __cplusplus < 201103L
+#define DISABLE_NULLPTR_TESTS
+#endif
+
struct A {};
A a;
const A ca = A();
@@ -99,6 +103,7 @@ void test5 ()
void test6 ()
{
+#if !defined(DISABLE_NULLPTR_TESTS)
try
{
throw nullptr;
@@ -111,6 +116,7 @@ void test6 ()
{
assert (false);
}
+#endif
}
void test7 ()
@@ -152,6 +158,7 @@ void test8 ()
void test9 ()
{
+#if !defined(DISABLE_NULLPTR_TESTS)
try
{
throw nullptr;
@@ -164,6 +171,7 @@ void test9 ()
{
assert (false);
}
+#endif
}
void test10 ()
Modified: libcxxabi/trunk/test/dynamic_cast_stress.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/dynamic_cast_stress.pass.cpp?rev=245531&r1=245530&r2=245531&view=diff
==============================================================================
--- libcxxabi/trunk/test/dynamic_cast_stress.pass.cpp (original)
+++ libcxxabi/trunk/test/dynamic_cast_stress.pass.cpp Wed Aug 19 20:22:17 2015
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
#include <cassert>
#include <tuple>
#include "support/timer.hpp"
More information about the cfe-commits
mailing list