[libcxx-commits] [libcxx] r356266 - Update a deque test with more assertions. NFC
Marshall Clow via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 15 08:00:41 PDT 2019
Author: marshall
Date: Fri Mar 15 08:00:41 2019
New Revision: 356266
URL: http://llvm.org/viewvc/llvm-project?rev=356266&view=rev
Log:
Update a deque test with more assertions. NFC
Modified:
libcxx/trunk/test/std/containers/sequences/array/indexing.pass.cpp
Modified: libcxx/trunk/test/std/containers/sequences/array/indexing.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/array/indexing.pass.cpp?rev=356266&r1=356265&r2=356266&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/array/indexing.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/array/indexing.pass.cpp Fri Mar 15 08:00:41 2019
@@ -64,11 +64,11 @@ int main(int, char**)
typedef double T;
typedef std::array<T, 0> C;
C c = {};
+ C const& cc = c;
LIBCPP_ASSERT_NOEXCEPT(c[0]);
+ LIBCPP_ASSERT_NOEXCEPT(cc[0]);
ASSERT_SAME_TYPE(C::reference, decltype(c[0]));
- C const& cc = c;
- static_assert((std::is_same<decltype(c[0]), T &>::value), "");
- static_assert((std::is_same<decltype(cc[0]), const T &>::value), "");
+ ASSERT_SAME_TYPE(C::const_reference, decltype(cc[0]));
if (c.size() > (0)) { // always false
C::reference r1 = c[0];
C::const_reference r2 = cc[0];
@@ -80,11 +80,11 @@ int main(int, char**)
typedef double T;
typedef std::array<const T, 0> C;
C c = {{}};
+ C const& cc = c;
LIBCPP_ASSERT_NOEXCEPT(c[0]);
+ LIBCPP_ASSERT_NOEXCEPT(cc[0]);
ASSERT_SAME_TYPE(C::reference, decltype(c[0]));
- C const& cc = c;
- static_assert((std::is_same<decltype(c[0]), const T &>::value), "");
- static_assert((std::is_same<decltype(cc[0]), const T &>::value), "");
+ ASSERT_SAME_TYPE(C::const_reference, decltype(cc[0]));
if (c.size() > (0)) { // always false
C::reference r1 = c[0];
C::const_reference r2 = cc[0];
More information about the libcxx-commits
mailing list