summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/strings/basic.string/string.ops
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-04-28 22:28:23 +0000
committerEric Fiselier <eric@efcs.ca>2016-04-28 22:28:23 +0000
commit1f4231f8cf138c810a55a398c07a422908add70f (patch)
tree37862fd2450b478ac9fcaf5742d8e2ccdd65be43 /libcxx/test/std/strings/basic.string/string.ops
parent174f8b19815cef8507fe0dbf03e5e639f3a60ba9 (diff)
downloadbcm5719-llvm-1f4231f8cf138c810a55a398c07a422908add70f.tar.gz
bcm5719-llvm-1f4231f8cf138c810a55a398c07a422908add70f.zip
Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macros
llvm-svn: 267947
Diffstat (limited to 'libcxx/test/std/strings/basic.string/string.ops')
-rw-r--r--libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
index dc01f4f4774..145e8dde58b 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
@@ -17,6 +17,7 @@
#include <algorithm>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
template <class S>
@@ -26,7 +27,7 @@ test(const S& s, typename S::size_type pos, typename S::size_type n)
try
{
S str = s.substr(pos, n);
- assert(str.__invariants());
+ LIBCPP_ASSERT(str.__invariants());
assert(pos <= s.size());
typename S::size_type rlen = std::min(n, s.size() - pos);
assert(str.size() == rlen);
@@ -101,7 +102,7 @@ int main()
test(S("lsaijeqhtrbgcdmpfkno"), 20, 0);
test(S("dplqartnfgejichmoskb"), 21, 0);
}
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
{
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
test(S(""), 0, 0);
OpenPOWER on IntegriCloud