This revision was automatically updated to reflect the committed changes.
Closed by commit rL285234: Cleanup nonportable behavior in tests for std::any
(authored by CaseyCarter).
Changed prior to commit:
https://reviews.llvm.org/D26007?vs=75936&id=75938#toc
Repository:
rL LLVM
https://reviews.llvm.org/D26007
Files:
libcxx/trunk/test/std/utilities/any/any.class/any.cons/move.pass.cpp
libcxx/trunk/test/std/utilities/any/any.class/any.cons/value.pass.cpp
libcxx/trunk/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
Index: libcxx/trunk/test/std/utilities/any/any.class/any.cons/value.pass.cpp
===================================================================
--- libcxx/trunk/test/std/utilities/any/any.class/any.cons/value.pass.cpp
+++ libcxx/trunk/test/std/utilities/any/any.class/any.cons/value.pass.cpp
@@ -137,10 +137,6 @@
static_assert(!std::is_constructible<std::any, T>::value, "");
}
{
- using DecayTag = std::decay_t<BadTag>;
- static_assert(!std::is_constructible<std::any, DecayTag>::value, "");
- }
- {
// Test that the ValueType&& constructor SFINAE's away when the
// argument is non-copyable
struct NoCopy {
Index: libcxx/trunk/test/std/utilities/any/any.class/any.cons/move.pass.cpp
===================================================================
--- libcxx/trunk/test/std/utilities/any/any.class/any.cons/move.pass.cpp
+++ libcxx/trunk/test/std/utilities/any/any.class/any.cons/move.pass.cpp
@@ -80,8 +80,8 @@
assert(Type::moved == 1 || Type::moved == 2); // zero or more move
operations can be performed.
assert(Type::copied == 0); // no copies can be performed.
assert(Type::count == 1 + a.has_value());
- assertEmpty(a); // Moves are always destructive.
assertContains<Type>(a2, 42);
+ LIBCPP_ASSERT(!a.has_value()); // Moves are always destructive.
if (a.has_value())
assertContains<Type>(a, 0);
}
Index: libcxx/trunk/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
===================================================================
--- libcxx/trunk/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
+++ libcxx/trunk/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
@@ -104,18 +104,18 @@
assertContains<T>(a, 42);
assert(T::count == 1);
assert(T::copied == 0);
- assert(T::moved == 0);
+ LIBCPP_ASSERT(T::moved == 0);
}
assert(small::count == 0);
{ // large
using T = large;
any a{T{42}};
T::reset();
a.swap(a);
assertContains<T>(a, 42);
- assert(T::copied == 0);
- assert(T::moved == 0);
assert(T::count == 1);
+ assert(T::copied == 0);
+ LIBCPP_ASSERT(T::moved == 0);
}
assert(large::count == 0);
}
Index: libcxx/trunk/test/std/utilities/any/any.class/any.cons/value.pass.cpp
===================================================================
--- libcxx/trunk/test/std/utilities/any/any.class/any.cons/value.pass.cpp
+++ libcxx/trunk/test/std/utilities/any/any.class/any.cons/value.pass.cpp
@@ -137,10 +137,6 @@
static_assert(!std::is_constructible<std::any, T>::value, "");
}
{
- using DecayTag = std::decay_t<BadTag>;
- static_assert(!std::is_constructible<std::any, DecayTag>::value, "");
- }
- {
// Test that the ValueType&& constructor SFINAE's away when the
// argument is non-copyable
struct NoCopy {
Index: libcxx/trunk/test/std/utilities/any/any.class/any.cons/move.pass.cpp
===================================================================
--- libcxx/trunk/test/std/utilities/any/any.class/any.cons/move.pass.cpp
+++ libcxx/trunk/test/std/utilities/any/any.class/any.cons/move.pass.cpp
@@ -80,8 +80,8 @@
assert(Type::moved == 1 || Type::moved == 2); // zero or more move operations can be performed.
assert(Type::copied == 0); // no copies can be performed.
assert(Type::count == 1 + a.has_value());
- assertEmpty(a); // Moves are always destructive.
assertContains<Type>(a2, 42);
+ LIBCPP_ASSERT(!a.has_value()); // Moves are always destructive.
if (a.has_value())
assertContains<Type>(a, 0);
}
Index: libcxx/trunk/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
===================================================================
--- libcxx/trunk/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
+++ libcxx/trunk/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
@@ -104,18 +104,18 @@
assertContains<T>(a, 42);
assert(T::count == 1);
assert(T::copied == 0);
- assert(T::moved == 0);
+ LIBCPP_ASSERT(T::moved == 0);
}
assert(small::count == 0);
{ // large
using T = large;
any a{T{42}};
T::reset();
a.swap(a);
assertContains<T>(a, 42);
- assert(T::copied == 0);
- assert(T::moved == 0);
assert(T::count == 1);
+ assert(T::copied == 0);
+ LIBCPP_ASSERT(T::moved == 0);
}
assert(large::count == 0);
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits