summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/utilities')
-rw-r--r--libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp6
-rw-r--r--libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp2
-rw-r--r--libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp2
-rw-r--r--libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp10
4 files changed, 10 insertions, 10 deletions
diff --git a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
index ed04a91ca40..5e0a116a5a5 100644
--- a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
+++ b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
@@ -80,7 +80,7 @@ void checkThrows(any& a)
{
#if !defined(TEST_HAS_NO_EXCEPTIONS)
try {
- any_cast<Type>(a);
+ (void)any_cast<Type>(a);
assert(false);
} catch (bad_any_cast const &) {
// do nothing
@@ -89,7 +89,7 @@ void checkThrows(any& a)
}
try {
- any_cast<ConstT>(static_cast<any const&>(a));
+ (void)any_cast<ConstT>(static_cast<any const&>(a));
assert(false);
} catch (bad_any_cast const &) {
// do nothing
@@ -103,7 +103,7 @@ void checkThrows(any& a)
typename std::remove_reference<Type>::type&&,
Type
>::type;
- any_cast<RefType>(static_cast<any&&>(a));
+ (void)any_cast<RefType>(static_cast<any&&>(a));
assert(false);
} catch (bad_any_cast const &) {
// do nothing
diff --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
index 768d4187843..e77e7d82ad5 100644
--- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
+++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
@@ -23,7 +23,7 @@ void test_max(size_t count)
{
std::allocator<T> a;
try {
- a.allocate(count);
+ (void)a.allocate(count);
assert(false);
} catch (const std::exception &) {
}
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
index 30a4933811e..d678bdedefc 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
@@ -134,7 +134,7 @@ int main()
#ifndef TEST_HAS_NO_EXCEPTIONS
try {
- ptr->shared_from_this();
+ (void)ptr->shared_from_this();
assert(false);
} catch (std::bad_weak_ptr const&) {
} catch (...) { assert(false); }
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
index 73cf073362f..b7ea8d4dc6d 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
@@ -112,11 +112,11 @@ int main()
std::weak_ptr<int> wp1;
std::owner_less<> cmp;
- cmp(sp1, sp2);
- cmp(sp1, wp1);
- cmp(sp1, sp3);
- cmp(wp1, sp1);
- cmp(wp1, wp1);
+ assert(!cmp(sp1, sp2));
+ assert(!cmp(sp1, wp1));
+ assert(!cmp(sp1, sp3));
+ assert(!cmp(wp1, sp1));
+ assert(!cmp(wp1, wp1));
ASSERT_NOEXCEPT(cmp(sp1, sp1));
ASSERT_NOEXCEPT(cmp(sp1, wp1));
ASSERT_NOEXCEPT(cmp(wp1, sp1));
OpenPOWER on IntegriCloud