| 763 | } |
| 764 | |
| 765 | void any_executor_assignment_test() |
| 766 | { |
| 767 | typedef execution::any_executor<> ex_no_props_t; |
| 768 | |
| 769 | typedef execution::any_executor< |
| 770 | execution::blocking_t |
| 771 | > ex_one_prop_t; |
| 772 | |
| 773 | typedef execution::any_executor< |
| 774 | execution::blocking_t, |
| 775 | execution::occupancy_t |
| 776 | > ex_two_props_t; |
| 777 | |
| 778 | thread_pool pool(1); |
| 779 | boost::asio::nullptr_t null_ptr = boost::asio::nullptr_t(); |
| 780 | |
| 781 | ex_two_props_t ex_two_props_1; |
| 782 | |
| 783 | ex_two_props_t ex_two_props_2; |
| 784 | ex_two_props_2 = null_ptr; |
| 785 | |
| 786 | BOOST_ASIO_CHECK(ex_two_props_2.target<void>() == 0); |
| 787 | |
| 788 | ex_two_props_t ex_two_props_3; |
| 789 | ex_two_props_3 = pool.executor(); |
| 790 | |
| 791 | BOOST_ASIO_CHECK(ex_two_props_3.target<void>() != 0); |
| 792 | |
| 793 | ex_two_props_t ex_two_props_4; |
| 794 | ex_two_props_4 = ex_two_props_1; |
| 795 | |
| 796 | BOOST_ASIO_CHECK(ex_two_props_4.target<void>() == 0); |
| 797 | BOOST_ASIO_CHECK(ex_two_props_4 == ex_two_props_1); |
| 798 | |
| 799 | ex_two_props_4 = ex_two_props_3; |
| 800 | |
| 801 | BOOST_ASIO_CHECK(ex_two_props_4.target<void>() != 0); |
| 802 | BOOST_ASIO_CHECK(ex_two_props_4 == ex_two_props_3); |
| 803 | |
| 804 | ex_two_props_t ex_two_props_5; |
| 805 | ex_two_props_5 = fat_executor(1); |
| 806 | |
| 807 | BOOST_ASIO_CHECK(ex_two_props_5.target<void>() != 0); |
| 808 | BOOST_ASIO_CHECK(ex_two_props_5 != null_ptr); |
| 809 | BOOST_ASIO_CHECK(ex_two_props_5 != ex_two_props_1); |
| 810 | |
| 811 | ex_two_props_t ex_two_props_6; |
| 812 | ex_two_props_6 = fat_executor(1); |
| 813 | |
| 814 | BOOST_ASIO_CHECK(ex_two_props_6.target<void>() != 0); |
| 815 | BOOST_ASIO_CHECK(ex_two_props_6 != null_ptr); |
| 816 | BOOST_ASIO_CHECK(ex_two_props_6 != ex_two_props_1); |
| 817 | BOOST_ASIO_CHECK(ex_two_props_6 == ex_two_props_5); |
| 818 | |
| 819 | ex_two_props_6 = fat_executor(2); |
| 820 | |
| 821 | BOOST_ASIO_CHECK(ex_two_props_6.target<void>() != 0); |
| 822 | BOOST_ASIO_CHECK(ex_two_props_6 != null_ptr); |
nothing calls this directly
no test coverage detected