Lines Matching refs:MetricIdAllocator
28 using bluetooth::common::MetricIdAllocator;
45 device_map[kthAddress(key)] = key + MetricIdAllocator::kMinId; in generateAddresses()
51 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
53 MetricIdAllocator::Callback callback = [](const RawAddress&, const int) { in TEST()
62 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
64 MetricIdAllocator::Callback callback = [](const RawAddress&, const int) { in TEST()
75 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
77 MetricIdAllocator::Callback callback = [](const RawAddress&, const int) { in TEST()
82 EXPECT_EQ(allocator.AllocateId(kthAddress(0)), MetricIdAllocator::kMinId); in TEST()
83 EXPECT_EQ(allocator.AllocateId(kthAddress(1)), MetricIdAllocator::kMinId + 1); in TEST()
84 EXPECT_EQ(allocator.AllocateId(kthAddress(0)), MetricIdAllocator::kMinId); in TEST()
85 EXPECT_EQ(allocator.AllocateId(kthAddress(2)), MetricIdAllocator::kMinId + 2); in TEST()
91 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
93 MetricIdAllocator::Callback callback = [](const RawAddress&, const int) { in TEST()
96 int id = static_cast<int>(MetricIdAllocator::kMaxNumPairedDevicesInMemory) + in TEST()
97 MetricIdAllocator::kMinId; in TEST()
100 generateAddresses(MetricIdAllocator::kMaxNumPairedDevicesInMemory); in TEST()
111 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
113 generateAddresses(MetricIdAllocator::kMaxNumPairedDevicesInMemory); in TEST()
115 MetricIdAllocator::Callback callback = [](const RawAddress&, const int) { in TEST()
118 int id = MetricIdAllocator::kMinId; in TEST()
131 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
135 MetricIdAllocator::Callback save_callback = [pointer](const RawAddress&, in TEST()
140 MetricIdAllocator::Callback forget_callback = [pointer](const RawAddress&, in TEST()
149 MetricIdAllocator::kMinId); in TEST()
160 MetricIdAllocator::kMinId + 1); in TEST()
162 MetricIdAllocator::kMinId + 2); in TEST()
182 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
185 generateAddresses(MetricIdAllocator::kMaxNumPairedDevicesInMemory); in TEST()
188 MetricIdAllocator::Callback save_callback = [pointer](const RawAddress&, in TEST()
193 MetricIdAllocator::Callback forget_callback = [pointer](const RawAddress&, in TEST()
206 key < static_cast<int>(MetricIdAllocator::kMaxNumPairedDevicesInMemory); in TEST()
209 key + MetricIdAllocator::kMinId); in TEST()
214 int id = static_cast<int>(MetricIdAllocator::kMaxNumPairedDevicesInMemory + in TEST()
215 MetricIdAllocator::kMinId); in TEST()
302 for (size_t k = MetricIdAllocator::kMaxNumPairedDevicesInMemory; in TEST()
303 k <= MetricIdAllocator::kMaxNumPairedDevicesInMemory + 4; k++) { in TEST()
314 kthAddress(MetricIdAllocator::kMaxNumPairedDevicesInMemory + 5))); in TEST()
321 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
325 MetricIdAllocator::Callback save_callback = [pointer](const RawAddress&, in TEST()
330 MetricIdAllocator::Callback forget_callback = [pointer](const RawAddress&, in TEST()
343 static_cast<int>(MetricIdAllocator::kMaxNumUnpairedDevicesInMemory); in TEST()
346 key + MetricIdAllocator::kMinId); in TEST()
351 int id = MetricIdAllocator::kMaxNumUnpairedDevicesInMemory + in TEST()
352 MetricIdAllocator::kMinId; in TEST()
354 kthAddress(MetricIdAllocator::kMaxNumUnpairedDevicesInMemory); in TEST()
366 addr = kthAddress(MetricIdAllocator::kMaxNumUnpairedDevicesInMemory + 1); in TEST()
376 static_cast<int>(MetricIdAllocator::kMaxNumUnpairedDevicesInMemory); in TEST()
385 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
388 MetricIdAllocator::Callback save_callback = [pointer](const RawAddress&, in TEST()
393 MetricIdAllocator::Callback forget_callback = [pointer](const RawAddress&, in TEST()
405 static_cast<int>(MetricIdAllocator::kMaxNumUnpairedDevicesInMemory); in TEST()
408 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
424 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
425 MetricIdAllocator::Callback callback = [](const RawAddress&, const int) { in TEST()
430 int min_id = MetricIdAllocator::kMinId; in TEST()
436 int max_id = MetricIdAllocator::kMaxId; in TEST()
454 auto& allocator = MetricIdAllocator::GetInstance(); in TEST()
455 MetricIdAllocator::Callback callback = [](const RawAddress&, const int) { in TEST()
460 int min_id = MetricIdAllocator::kMinId; in TEST()
461 int max_id = MetricIdAllocator::kMaxId; in TEST()