summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/re
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2019-04-26 17:10:03 +0000
committerMarshall Clow <mclow.lists@gmail.com>2019-04-26 17:10:03 +0000
commitc29db2d83ed57d74d1f9987324e3d6ef112a8ed3 (patch)
treee536d665654fbac7d843633fb05fdef9979e25a9 /libcxx/test/std/re
parentefc94feef98a5d88eda8e2aee604fcb446dacfe7 (diff)
downloadbcm5719-llvm-c29db2d83ed57d74d1f9987324e3d6ef112a8ed3.tar.gz
bcm5719-llvm-c29db2d83ed57d74d1f9987324e3d6ef112a8ed3.zip
Add '_LIBCPP_ASSERT(ready())' to several match_results method that have this precondtion. Fix several tests which did not honor this precondition. Thanks to Andrey Maksimov for pointing this out.
llvm-svn: 359324
Diffstat (limited to 'libcxx/test/std/re')
-rw-r--r--libcxx/test/std/re/re.results/re.results.all/get_allocator.pass.cpp2
-rw-r--r--libcxx/test/std/re/re.results/re.results.const/allocator.pass.cpp2
-rw-r--r--libcxx/test/std/re/re.results/re.results.const/copy.pass.cpp2
-rw-r--r--libcxx/test/std/re/re.results/re.results.const/copy_assign.pass.cpp2
-rw-r--r--libcxx/test/std/re/re.results/re.results.const/default.pass.cpp2
-rw-r--r--libcxx/test/std/re/re.results/re.results.const/move.pass.cpp2
-rw-r--r--libcxx/test/std/re/re.results/re.results.const/move_assign.pass.cpp2
7 files changed, 7 insertions, 7 deletions
diff --git a/libcxx/test/std/re/re.results/re.results.all/get_allocator.pass.cpp b/libcxx/test/std/re/re.results/re.results.all/get_allocator.pass.cpp
index f0dcd7b6d42..33b5970d88b 100644
--- a/libcxx/test/std/re/re.results/re.results.all/get_allocator.pass.cpp
+++ b/libcxx/test/std/re/re.results/re.results.all/get_allocator.pass.cpp
@@ -24,7 +24,7 @@ test(const Allocator& a)
{
std::match_results<const CharT*, Allocator> m(a);
assert(m.size() == 0);
- assert(m.str() == std::basic_string<CharT>());
+ assert(!m.ready());
assert(m.get_allocator() == a);
}
diff --git a/libcxx/test/std/re/re.results/re.results.const/allocator.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/allocator.pass.cpp
index 99ecb667b75..659954607ca 100644
--- a/libcxx/test/std/re/re.results/re.results.const/allocator.pass.cpp
+++ b/libcxx/test/std/re/re.results/re.results.const/allocator.pass.cpp
@@ -24,7 +24,7 @@ test(const Allocator& a)
{
std::match_results<const CharT*, Allocator> m(a);
assert(m.size() == 0);
- assert(m.str() == std::basic_string<CharT>());
+ assert(!m.ready());
assert(m.get_allocator() == a);
}
diff --git a/libcxx/test/std/re/re.results/re.results.const/copy.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/copy.pass.cpp
index a1dbea0e840..88b8093449e 100644
--- a/libcxx/test/std/re/re.results/re.results.const/copy.pass.cpp
+++ b/libcxx/test/std/re/re.results/re.results.const/copy.pass.cpp
@@ -26,7 +26,7 @@ test(const Allocator& a)
SM m1(m0);
assert(m1.size() == m0.size());
- assert(m1.str() == m0.str());
+ assert(m1.ready() == m0.ready());
assert(m1.get_allocator() == m0.get_allocator());
}
diff --git a/libcxx/test/std/re/re.results/re.results.const/copy_assign.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/copy_assign.pass.cpp
index 943037e752f..1b220dfb899 100644
--- a/libcxx/test/std/re/re.results/re.results.const/copy_assign.pass.cpp
+++ b/libcxx/test/std/re/re.results/re.results.const/copy_assign.pass.cpp
@@ -27,7 +27,7 @@ test(const Allocator& a)
m1 = m0;
assert(m1.size() == m0.size());
- assert(m1.str() == m0.str());
+ assert(m1.ready() == m0.ready());
if (std::allocator_traits<Allocator>::propagate_on_container_copy_assignment::value)
assert(m1.get_allocator() == m0.get_allocator());
else
diff --git a/libcxx/test/std/re/re.results/re.results.const/default.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/default.pass.cpp
index a70c3441db3..783cd29423d 100644
--- a/libcxx/test/std/re/re.results/re.results.const/default.pass.cpp
+++ b/libcxx/test/std/re/re.results/re.results.const/default.pass.cpp
@@ -22,7 +22,7 @@ test()
{
std::match_results<const CharT*> m;
assert(m.size() == 0);
- assert(m.str() == std::basic_string<CharT>());
+ assert(!m.ready());
assert(m.get_allocator() == std::allocator<std::sub_match<const CharT*> >());
}
diff --git a/libcxx/test/std/re/re.results/re.results.const/move.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/move.pass.cpp
index 778e31b26f7..eb292d3a260 100644
--- a/libcxx/test/std/re/re.results/re.results.const/move.pass.cpp
+++ b/libcxx/test/std/re/re.results/re.results.const/move.pass.cpp
@@ -31,7 +31,7 @@ test(const Allocator& a)
SM m1(std::move(m0));
assert(m1.size() == 0);
- assert(m1.str() == std::basic_string<CharT>());
+ assert(!m1.ready());
assert(m1.get_allocator() == a);
}
diff --git a/libcxx/test/std/re/re.results/re.results.const/move_assign.pass.cpp b/libcxx/test/std/re/re.results/re.results.const/move_assign.pass.cpp
index 2a62af8f297..42393f1d2c8 100644
--- a/libcxx/test/std/re/re.results/re.results.const/move_assign.pass.cpp
+++ b/libcxx/test/std/re/re.results/re.results.const/move_assign.pass.cpp
@@ -28,7 +28,7 @@ test(const Allocator& a)
m1 = std::move(m0);
assert(m1.size() == 0);
- assert(m1.str() == std::basic_string<CharT>());
+ assert(!m1.ready());
if (std::allocator_traits<Allocator>::propagate_on_container_move_assignment::value)
assert(m1.get_allocator() == a);
else
OpenPOWER on IntegriCloud