summaryrefslogtreecommitdiff
path: root/test/std/utilities/tuple/tuple.tuple
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:34 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:34 +0000
commitd23de13b3208b94a25e1de463ea3155911512e61 (patch)
treec2bc9a0cec68a68070eda79306ab632043b91fea /test/std/utilities/tuple/tuple.tuple
parent8462a49537476f8c62bcabfe490226af0d7c1cae (diff)
Notes
Diffstat (limited to 'test/std/utilities/tuple/tuple.tuple')
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp2
-rw-r--r--test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp16
2 files changed, 15 insertions, 3 deletions
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp
index d7b184f6383c..b4fd2e26425a 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp
@@ -16,7 +16,7 @@
// ~tuple();
// C++17 added:
-// The destructor of tuple shall be a trivial destructor
+// The destructor of tuple shall be a trivial destructor
// if (is_trivially_destructible_v<Types> && ...) is true.
#include <tuple>
diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
index aadbf3d5a369..03fb78caa08e 100644
--- a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
+++ b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
@@ -64,18 +64,22 @@ void test_decomp_tuple() {
void test_decomp_pair() {
typedef std::pair<int, double> T;
{
- T s{99, 42.1};
+ T s{99, 42.5};
auto [m1, m2] = s;
auto& [r1, r2] = s;
assert(m1 == 99);
+ assert(m2 == 42.5);
assert(&r1 == &std::get<0>(s));
+ assert(&r2 == &std::get<1>(s));
}
{
- T const s{99, 42.1};
+ T const s{99, 42.5};
auto [m1, m2] = s;
auto& [r1, r2] = s;
assert(m1 == 99);
+ assert(m2 == 42.5);
assert(&r1 == &std::get<0>(s));
+ assert(&r2 == &std::get<1>(s));
}
}
@@ -86,14 +90,22 @@ void test_decomp_array() {
auto [m1, m2, m3] = s;
auto& [r1, r2, r3] = s;
assert(m1 == 99);
+ assert(m2 == 42);
+ assert(m3 == -1);
assert(&r1 == &std::get<0>(s));
+ assert(&r2 == &std::get<1>(s));
+ assert(&r3 == &std::get<2>(s));
}
{
T const s{{99, 42, -1}};
auto [m1, m2, m3] = s;
auto& [r1, r2, r3] = s;
assert(m1 == 99);
+ assert(m2 == 42);
+ assert(m3 == -1);
assert(&r1 == &std::get<0>(s));
+ assert(&r2 == &std::get<1>(s));
+ assert(&r3 == &std::get<2>(s));
}
}