Lines Matching refs:hm
211 HintManager hm(nm_, actions_); in TEST_F() local
212 EXPECT_TRUE(hm.Start()); in TEST_F()
213 std::vector<std::string> hints = hm.GetHints(); in TEST_F()
214 EXPECT_TRUE(hm.IsRunning()); in TEST_F()
222 auto hm = std::make_unique<HintManager>(nm_, actions_); in TEST_F() local
223 EXPECT_TRUE(InitHintStatus(hm)); in TEST_F()
224 EXPECT_TRUE(hm->Start()); in TEST_F()
225 HintStats launch_stats(hm->GetHintStats("LAUNCH")); in TEST_F()
228 HintStats interaction_stats(hm->GetHintStats("INTERACTION")); in TEST_F()
235 HintManager hm(nm_, actions_); in TEST_F() local
236 EXPECT_TRUE(hm.Start()); in TEST_F()
238 EXPECT_TRUE(hm.IsRunning()); in TEST_F()
246 HintManager hm(nm_, actions_); in TEST_F() local
247 EXPECT_TRUE(hm.IsHintSupported("INTERACTION")); in TEST_F()
248 EXPECT_TRUE(hm.IsHintSupported("LAUNCH")); in TEST_F()
249 EXPECT_FALSE(hm.IsHintSupported("NO_SUCH_HINT")); in TEST_F()
254 auto hm = std::make_unique<HintManager>(nm_, actions_); in TEST_F() local
255 EXPECT_TRUE(InitHintStatus(hm)); in TEST_F()
257 hm->DumpToFd(dumptf.fd); in TEST_F()
269 EXPECT_TRUE(hm->Start()); in TEST_F()
271 EXPECT_TRUE(hm->IsRunning()); in TEST_F()
272 hm->DumpToFd(dumptf_started.fd); in TEST_F()
288 auto hm = std::make_unique<HintManager>(nm_, actions_); in TEST_F() local
289 EXPECT_TRUE(InitHintStatus(hm)); in TEST_F()
290 EXPECT_TRUE(hm->Start()); in TEST_F()
291 EXPECT_TRUE(hm->IsRunning()); in TEST_F()
292 EXPECT_TRUE(hm->DoHint("INTERACTION")); in TEST_F()
298 EXPECT_TRUE(hm->DoHint("INTERACTION", 200ms)); in TEST_F()
300 EXPECT_TRUE(hm->DoHint("LAUNCH")); in TEST_F()
305 EXPECT_TRUE(hm->DoHint("LAUNCH", 500ms)); in TEST_F()
316 EXPECT_TRUE(hm->EndHint("LAUNCH")); in TEST_F()
327 EXPECT_TRUE(hm->EndHint("INTERACTION")); in TEST_F()
337 auto hm = std::make_unique<HintManager>(nm_, actions_); in TEST_F() local
338 EXPECT_TRUE(InitHintStatus(hm)); in TEST_F()
339 EXPECT_TRUE(hm->Start()); in TEST_F()
340 EXPECT_TRUE(hm->IsRunning()); in TEST_F()
341 EXPECT_TRUE(hm->DoHint("INTERACTION")); in TEST_F()
347 EXPECT_TRUE(hm->DoHint("LAUNCH", 500ms)); in TEST_F()
357 HintStats launch_stats(hm->GetHintStats("LAUNCH")); in TEST_F()
362 EXPECT_TRUE(hm->EndHint("INTERACTION")); in TEST_F()
368 HintStats interaction_stats(hm->GetHintStats("INTERACTION")); in TEST_F()
372 EXPECT_TRUE(hm->DoHint("LAUNCH")); in TEST_F()
373 launch_stats = hm->GetHintStats("LAUNCH"); in TEST_F()
601 std::unique_ptr<HintManager> hm = in TEST_F() local
603 EXPECT_NE(nullptr, hm.get()); in TEST_F()
604 EXPECT_FALSE(hm->IsRunning()); in TEST_F()
605 EXPECT_TRUE(hm->Start()); in TEST_F()
606 EXPECT_TRUE(hm->IsRunning()); in TEST_F()
607 hm = HintManager::GetFromJSON(json_file.path); in TEST_F()
608 EXPECT_NE(nullptr, hm.get()); in TEST_F()
609 EXPECT_TRUE(hm->IsRunning()); in TEST_F()
611 EXPECT_TRUE(hm->IsRunning()); in TEST_F()
617 EXPECT_TRUE(hm->DoHint("INTERACTION")); in TEST_F()
623 EXPECT_TRUE(hm->DoHint("LAUNCH")); in TEST_F()
633 EXPECT_TRUE(hm->EndHint("LAUNCH")); in TEST_F()
646 EXPECT_TRUE(hm->DoHint("MASK_LAUNCH_MODE")); in TEST_F()
647 EXPECT_FALSE(hm->DoHint("LAUNCH")); // should fail in TEST_F()
654 EXPECT_TRUE(hm->EndHint("MASK_LAUNCH_MODE")); in TEST_F()
655 EXPECT_TRUE(hm->DoHint("LAUNCH")); in TEST_F()
661 EXPECT_TRUE(hm->DoHint("END_LAUNCH_MODE")); in TEST_F()
666 EXPECT_TRUE(hm->EndHint("END_LAUNCH_MODE")); in TEST_F()
669 EXPECT_TRUE(hm->DoHint("DO_LAUNCH_MODE")); in TEST_F()