src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/test/timer_test.cc
// Setup the dispatcher and work queue
Setup the dispatcher and work queue
Setup the dispatcher and work queue
void TimerTest::SetUp() {
  fake_drvr_ = std::make_unique<brcmf_pub>();
  dispatcher_loop_ = std::make_unique<::async::Loop>(&kAsyncLoopConfigNoAttachToCurrentThread);
  zx_status_t status = dispatcher_loop_->StartThread("test-timer-worker", nullptr);
  EXPECT_EQ(status, ZX_OK);
  fake_drvr_->dispatcher = dispatcher_loop_->dispatcher();
  auto queue = std::make_unique<WorkQueue>("TimerTest Work");
  queue_ = std::move(queue);
  ASSERT_TRUE(std::is_standard_layout<Timer>::value);
}
void TimerTest :: SetUp ( ) { fake_drvr_ = std :: make_unique < brcmf_pub > ( ) ; dispatcher_loop_ = std :: make_unique < :: async :: Loop > ( & kAsyncLoopConfigNoAttachToCurrentThread ) ; zx_status_t status = dispatcher_loop_ -> StartThread ( " " , nullptr ) ; EXPECT_EQ ( status , ZX_OK ) ; fake_drvr_ -> dispatcher = dispatcher_loop_ -> dispatcher ( ) ; auto queue = std :: make_unique < WorkQueue > ( " " ) ; queue_ = std :: move ( queue ) ; ASSERT_TRUE ( std :: is_standard_layout < Timer > :: value ) ; }
Setup the dispatcher and work queue
Setup the dispatcher and work queue
// The timer must be standard layout in order to use containerof