diff options
Diffstat (limited to 'libcxx/test/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp')
-rw-r--r-- | libcxx/test/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp b/libcxx/test/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp index 8c419af..065827a 100644 --- a/libcxx/test/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp +++ b/libcxx/test/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp @@ -258,6 +258,29 @@ constexpr bool test() { assert(e1.error().data_ == 10); assert(oldState.moveAssignCalled); } + + // CheckForInvalidWrites + { + { + CheckForInvalidWrites<true> e1(std::unexpect); + CheckForInvalidWrites<true> e2; + + e1 = std::move(e2); + + assert(e1.check()); + assert(e2.check()); + } + { + CheckForInvalidWrites<false> e1(std::unexpect); + CheckForInvalidWrites<false> e2; + + e1 = std::move(e2); + + assert(e1.check()); + assert(e2.check()); + } + } + return true; } |