| 970 | } |
| 971 | |
| 972 | void TCoroTest::TestUserEvent() { |
| 973 | TContExecutor exec(32000); |
| 974 | |
| 975 | struct TUserEvent : public IUserEvent { |
| 976 | bool Called = false; |
| 977 | void Execute() override { |
| 978 | Called = true; |
| 979 | } |
| 980 | } event; |
| 981 | |
| 982 | auto f = [&](TCont* cont) { |
| 983 | UNIT_ASSERT(!event.Called); |
| 984 | exec.ScheduleUserEvent(&event); |
| 985 | UNIT_ASSERT(!event.Called); |
| 986 | cont->Yield(); |
| 987 | UNIT_ASSERT(event.Called); |
| 988 | }; |
| 989 | |
| 990 | exec.Execute(f); |
| 991 | |
| 992 | UNIT_ASSERT(event.Called); |
| 993 | } |
| 994 | |
| 995 | void TCoroTest::TestOverrideTime() { |
| 996 | class TTime: public NCoro::ITime { |
nothing calls this directly
no test coverage detected