summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-10-12 10:28:09 +0000
committerEric Fiselier <eric@efcs.ca>2016-10-12 10:28:09 +0000
commit6b42540756262beb65fda7e4b844376ff70499bd (patch)
tree7e6a3e05456c43c90bb697742ea3d5a4fa065762 /libcxx/test
parent8999edf2f69029246971265f4e0128e0a4d6d725 (diff)
downloadbcm5719-llvm-6b42540756262beb65fda7e4b844376ff70499bd.tar.gz
bcm5719-llvm-6b42540756262beb65fda7e4b844376ff70499bd.zip
Remove usages of _LIBCPP_CONSTEXPR under test/std
llvm-svn: 284002
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp8
-rw-r--r--libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp8
-rw-r--r--libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp8
-rw-r--r--libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp8
-rw-r--r--libcxx/test/std/utilities/time/rep.h10
5 files changed, 26 insertions, 16 deletions
diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp
index 1c2b2a80c59..a5893ead732 100644
--- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp
@@ -17,6 +17,8 @@
#include <random>
#include <cassert>
+#include "test_macros.h"
+
template <class UIntType, UIntType Min, UIntType Max>
class rand1
{
@@ -30,14 +32,14 @@ private:
static_assert(Min < Max, "rand1 invalid parameters");
public:
-#ifdef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
// Workaround for lack of constexpr in C++03
static const result_type _Min = Min;
static const result_type _Max = Max;
#endif
- static _LIBCPP_CONSTEXPR result_type min() {return Min;}
- static _LIBCPP_CONSTEXPR result_type max() {return Max;}
+ static TEST_CONSTEXPR result_type min() {return Min;}
+ static TEST_CONSTEXPR result_type max() {return Max;}
explicit rand1(result_type sd = Min) : x_(sd)
{
diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp
index 78040ad987d..9ae95547801 100644
--- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp
@@ -19,6 +19,8 @@
#include <random>
#include <type_traits>
+#include "test_macros.h"
+
template <class UIntType, UIntType Min, UIntType Max>
class rand1
{
@@ -32,14 +34,14 @@ private:
static_assert(Min < Max, "rand1 invalid parameters");
public:
-#ifdef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
// Workaround for lack of constexpr in C++03
static const result_type _Min = Min;
static const result_type _Max = Max;
#endif
- static _LIBCPP_CONSTEXPR result_type min() {return Min;}
- static _LIBCPP_CONSTEXPR result_type max() {return Max;}
+ static TEST_CONSTEXPR result_type min() {return Min;}
+ static TEST_CONSTEXPR result_type max() {return Max;}
explicit rand1(result_type sd = Min) : x_(sd)
{
diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp
index c218c17dde6..d2a5292e132 100644
--- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp
@@ -17,6 +17,8 @@
#include <random>
#include <cassert>
+#include "test_macros.h"
+
template <class UIntType, UIntType Min, UIntType Max>
class rand1
{
@@ -30,14 +32,14 @@ private:
static_assert(Min < Max, "rand1 invalid parameters");
public:
-#ifdef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
// Workaround for lack of constexpr in C++03
static const result_type _Min = Min;
static const result_type _Max = Max;
#endif
- static _LIBCPP_CONSTEXPR result_type min() {return Min;}
- static _LIBCPP_CONSTEXPR result_type max() {return Max;}
+ static TEST_CONSTEXPR result_type min() {return Min;}
+ static TEST_CONSTEXPR result_type max() {return Max;}
explicit rand1(result_type sd = Min) : x_(sd)
{
diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp
index 3271d933cb2..a6f1eadb088 100644
--- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp
@@ -19,6 +19,8 @@
#include <random>
#include <type_traits>
+#include "test_macros.h"
+
template <class UIntType, UIntType Min, UIntType Max>
class rand1
{
@@ -32,14 +34,14 @@ private:
static_assert(Min < Max, "rand1 invalid parameters");
public:
-#ifdef _LIBCPP_HAS_NO_CONSTEXPR
+#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
// Workaround for lack of constexpr in C++03
static const result_type _Min = Min;
static const result_type _Max = Max;
#endif
- static _LIBCPP_CONSTEXPR result_type min() {return Min;}
- static _LIBCPP_CONSTEXPR result_type max() {return Max;}
+ static TEST_CONSTEXPR result_type min() {return Min;}
+ static TEST_CONSTEXPR result_type max() {return Max;}
explicit rand1(result_type sd = Min) : x_(sd)
{
diff --git a/libcxx/test/std/utilities/time/rep.h b/libcxx/test/std/utilities/time/rep.h
index 2ec3514ab56..1c76582d372 100644
--- a/libcxx/test/std/utilities/time/rep.h
+++ b/libcxx/test/std/utilities/time/rep.h
@@ -10,15 +10,17 @@
#ifndef REP_H
#define REP_H
+#include "test_macros.h"
+
class Rep
{
int data_;
public:
- _LIBCPP_CONSTEXPR Rep() : data_(-1) {}
- explicit _LIBCPP_CONSTEXPR Rep(int i) : data_(i) {}
+ TEST_CONSTEXPR Rep() : data_(-1) {}
+ explicit TEST_CONSTEXPR Rep(int i) : data_(i) {}
- bool _LIBCPP_CONSTEXPR operator==(int i) const {return data_ == i;}
- bool _LIBCPP_CONSTEXPR operator==(const Rep& r) const {return data_ == r.data_;}
+ bool TEST_CONSTEXPR operator==(int i) const {return data_ == i;}
+ bool TEST_CONSTEXPR operator==(const Rep& r) const {return data_ == r.data_;}
Rep& operator*=(Rep x) {data_ *= x.data_; return *this;}
Rep& operator/=(Rep x) {data_ /= x.data_; return *this;}
OpenPOWER on IntegriCloud