| 76 | } |
| 77 | |
| 78 | void future_test::test_future() |
| 79 | { |
| 80 | std::future<int> f1{}; |
| 81 | test("default constructed invalid", !f1.valid()); |
| 82 | |
| 83 | std::future<int> f2{new std::aux::shared_state<int>{}}; |
| 84 | test("state constructed valid", f2.valid()); |
| 85 | |
| 86 | f1 = std::move(f2); |
| 87 | test("move assignment source invalid", !f2.valid()); |
| 88 | test("move assignment destination valid", f1.valid()); |
| 89 | |
| 90 | std::future<int> f3{std::move(f1)}; |
| 91 | test("move construction source invalid", !f1.valid()); |
| 92 | test("move construction destination valid", f3.valid()); |
| 93 | } |
| 94 | |
| 95 | void future_test::test_promise() |
| 96 | { |