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