src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/assoc_test.cc
TEST_F(AssocTest, SsidTest) {
  // Create our device instance
  Init();

  // Start up our fake AP
  simulation::FakeAp ap(env_.get(), kDefaultBssid, kDefaultSsid, kDefaultChannel);
  ap.EnableBeacon(zx::msec(100));
  aps_.push_back(&ap);

  context_.bssid = wlan::common::kZeroMac;  // Use the wildcard BSSID
  context_.expected_results.push_front(WLAN_ASSOC_RESULT_SUCCESS);

  ScheduleAssocReq(zx::msec(10));

  env_->Run();

  EXPECT_EQ(context_.assoc_resp_count, 1U);
}
// Verify that we can associate using only SSID, not BSSID
Verify that we can associate using only SSID, not BSSID
Verify that we can associate using only SSID not BSSID
TEST_F(AssocTest, SsidTest) {
  Init();
  simulation::FakeAp ap(env_.get(), kDefaultBssid, kDefaultSsid, kDefaultChannel);
  ap.EnableBeacon(zx::msec(100));
  aps_.push_back(&ap);
  context_.bssid = wlan::common::kZeroMac;  
  context_.expected_results.push_front(WLAN_ASSOC_RESULT_SUCCESS);
  ScheduleAssocReq(zx::msec(10));
  env_->Run();
  EXPECT_EQ(context_.assoc_resp_count, 1U);
}
TEST_F ( AssocTest , SsidTest ) { Init ( ) ; simulation :: FakeAp ap ( env_ . get ( ) , kDefaultBssid , kDefaultSsid , kDefaultChannel ) ; ap . EnableBeacon ( zx :: msec ( 100 ) ) ; aps_ . push_back ( & ap ) ; context_ . bssid = wlan :: common :: kZeroMac ; context_ . expected_results . push_front ( WLAN_ASSOC_RESULT_SUCCESS ) ; ScheduleAssocReq ( zx :: msec ( 10 ) ) ; env_ -> Run ( ) ; EXPECT_EQ ( context_ . assoc_resp_count , 1U ) ; }
Verify that we can associate using only SSID, not BSSID
Verify that we can associate using only SSID not BSSID
// Create our device instance // Start up our fake AP // Use the wildcard BSSID