| 868 | } |
| 869 | |
| 870 | void TCoroTest::TestNestedExecutor() { |
| 871 | #ifndef _win_ |
| 872 | //nested executors actually don't work correctly, but anyway shouldn't break RunningCont() ptr |
| 873 | TContExecutor exec(32000); |
| 874 | UNIT_ASSERT(!RunningCont()); |
| 875 | |
| 876 | exec.Execute([](TCont* cont, void*) { |
| 877 | UNIT_ASSERT_VALUES_EQUAL(RunningCont(), cont); |
| 878 | |
| 879 | TContExecutor exec2(32000); |
| 880 | exec2.Execute([](TCont* cont2, void*) { |
| 881 | UNIT_ASSERT_VALUES_EQUAL(RunningCont(), cont2); |
| 882 | TContExecutor exec3(32000); |
| 883 | exec3.Execute([](TCont* cont3, void*) { |
| 884 | UNIT_ASSERT_VALUES_EQUAL(RunningCont(), cont3); |
| 885 | }); |
| 886 | |
| 887 | UNIT_ASSERT_VALUES_EQUAL(RunningCont(), cont2); |
| 888 | }); |
| 889 | |
| 890 | UNIT_ASSERT_VALUES_EQUAL(RunningCont(), cont); |
| 891 | }); |
| 892 | |
| 893 | UNIT_ASSERT(!RunningCont()); |
| 894 | #endif |
| 895 | } |
| 896 | |
| 897 | void TCoroTest::TestComputeCoroutineYield() { |
| 898 | //if we have busy (e.g., on cpu) coroutine, when it yields, io must flow |
nothing calls this directly
no test coverage detected