From 73d2f94f6b92a53a7918c9323ac80a3fa087d49b Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Tue, 23 Nov 2010 19:52:19 +0000 Subject: [PATCH] Update testsuite strucuture to latest draft git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@120036 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../scoped.adaptor.operators/eq.pass.cpp | 64 +++++++++++++++++++ .../consistency.pass.cpp | 0 .../now.pass.cpp | 0 3 files changed, 64 insertions(+) create mode 100644 test/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp rename test/utilities/time/time.clock/{time.clock.monotonic => time.clock.steady}/consistency.pass.cpp (100%) rename test/utilities/time/time.clock/{time.clock.monotonic => time.clock.steady}/now.pass.cpp (100%) diff --git a/test/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp b/test/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp new file mode 100644 index 00000000..917c9fac --- /dev/null +++ b/test/utilities/allocator.adaptor/scoped.adaptor.operators/eq.pass.cpp @@ -0,0 +1,64 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// + +// template +// class scoped_allocator_adaptor + +// template +// bool +// operator==(const scoped_allocator_adaptor& a, +// const scoped_allocator_adaptor& b); +// +// template +// bool +// operator!=(const scoped_allocator_adaptor& a, +// const scoped_allocator_adaptor& b); + +#include +#include + +#include "../allocators.h" + +int main() +{ +#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES + + { + typedef std::scoped_allocator_adaptor> A; + A a1(A1(3)); + A a2 = a1; + assert(a2 == a1); + assert(!(a2 != a1)); + } + { + typedef std::scoped_allocator_adaptor, A2> A; + A a1(A1(4), A2(5)); + A a2 = a1; + assert(a2 == a1); + assert(!(a2 != a1)); + } + { + typedef std::scoped_allocator_adaptor, A2, A3> A; + A a1(A1(4), A2(5), A3(6)); + A a2 = a1; + assert(a2 == a1); + assert(!(a2 != a1)); + } + { + typedef std::scoped_allocator_adaptor, A2, A3> A; + A a1(A1(4), A2(5), A3(6)); + A a2(A1(4), A2(5), A3(5)); + assert(a2 != a1); + assert(!(a2 == a1)); + } + +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +} diff --git a/test/utilities/time/time.clock/time.clock.monotonic/consistency.pass.cpp b/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp similarity index 100% rename from test/utilities/time/time.clock/time.clock.monotonic/consistency.pass.cpp rename to test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp diff --git a/test/utilities/time/time.clock/time.clock.monotonic/now.pass.cpp b/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp similarity index 100% rename from test/utilities/time/time.clock/time.clock.monotonic/now.pass.cpp rename to test/utilities/time/time.clock/time.clock.steady/now.pass.cpp