Skip to content

Create more test cases for async timer functions set_timeout and set_interval #46

@adityarao2005

Description

@adityarao2005

Create test cases for set_timeout and set_interval which exist in webcraft/async/runtime.hpp

Something simple like the following:

      // set timeout test
     runtime_context ctx;
     
     event_signal signal;
     
      auto f = async {
     
        set_timeout([signal]() { signal.set(); }, 100ms);
     
        co_await sleep_for(100ms);
     
        EXPECT_TRUE(signal.is_set());
      };
     
      sync_wait(f());

Maybe an atomic counter for the set_interval?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Low PriorityThis can wait till someone is free and can work on thishelp wantedExtra attention is needed

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions