diff options
Diffstat (limited to 'libcxx/test/std/utilities/expected/expected.void/assign/assign.move.pass.cpp')
-rw-r--r-- | libcxx/test/std/utilities/expected/expected.void/assign/assign.move.pass.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/expected/expected.void/assign/assign.move.pass.cpp b/libcxx/test/std/utilities/expected/expected.void/assign/assign.move.pass.cpp index e6a29cd..60ae034 100644 --- a/libcxx/test/std/utilities/expected/expected.void/assign/assign.move.pass.cpp +++ b/libcxx/test/std/utilities/expected/expected.void/assign/assign.move.pass.cpp @@ -125,6 +125,28 @@ constexpr bool test() { assert(state.moveAssignCalled); } + // CheckForInvalidWrites + { + { + CheckForInvalidWrites<true, true> e1; + CheckForInvalidWrites<true, true> e2(std::unexpect); + + e1 = std::move(e2); + + assert(e1.check()); + assert(e2.check()); + } + { + CheckForInvalidWrites<false, true> e1; + CheckForInvalidWrites<false, true> e2(std::unexpect); + + e1 = std::move(e2); + + assert(e1.check()); + assert(e2.check()); + } + } + return true; } |