src/connectivity/wlan/drivers/testing/lib/sim-env/test/event_unittests.cc
// Test multiple events at same time. Events should be processed in the order they were added.
Test multiple events at same time. Events should be processed in the order they were added.
Test multiple events at same time . Events should be processed in the order they were added .
TEST_F(EventTest, DuplicateEvents) {
  for (uint32_t i = 0; i < kDuplicateEventCount; i++) {
    auto duplicate_handler = std::make_unique<std::function<void()>>();
    *duplicate_handler = std::bind(&EventTest::DuplicateTimeEventCallback, this, i);
    EXPECT_EQ(env_.ScheduleNotification(std::move(duplicate_handler), kDuplicateEventsTime), ZX_OK);
  }
  env_.Run();
  EXPECT_EQ(completed_, true);
  EXPECT_EQ(env_.GetTime(), ABSOLUTE_TIME(kDuplicateEventsTime));
}
TEST_F ( EventTest , DuplicateEvents ) { for ( uint32_t i = 0 ; i < kDuplicateEventCount ; i ++ ) { auto duplicate_handler = std :: make_unique < std :: function < void ( ) > > ( ) ; * duplicate_handler = std :: bind ( & EventTest :: DuplicateTimeEventCallback , this , i ) ; EXPECT_EQ ( env_ . ScheduleNotification ( std :: move ( duplicate_handler ) , kDuplicateEventsTime ) , ZX_OK ) ; } env_ . Run ( ) ; EXPECT_EQ ( completed_ , true ) ; EXPECT_EQ ( env_ . GetTime ( ) , ABSOLUTE_TIME ( kDuplicateEventsTime ) ) ; }
Test multiple events at same time.
Test multiple events at same time .