Lines Matching refs:found
88 TraceEventVector found; in TEST_F() local
89 analyzer->FindEvents(Query::Bool(true), &found); in TEST_F()
90 EXPECT_EQ(0u, found.size()); in TEST_F()
247 TraceEventVector found; in TEST_F() local
251 analyzer->FindEvents(Query::EventCategory() == Query::String("cat1"), &found); in TEST_F()
252 ASSERT_EQ(2u, found.size()); in TEST_F()
253 EXPECT_STREQ("name1", found[0]->name.c_str()); in TEST_F()
254 EXPECT_STREQ("name2", found[1]->name.c_str()); in TEST_F()
256 analyzer->FindEvents(Query::EventArg("num") == Query::Int(2), &found); in TEST_F()
257 ASSERT_EQ(1u, found.size()); in TEST_F()
258 EXPECT_STREQ("name2", found[0]->name.c_str()); in TEST_F()
262 analyzer->FindEvents(Query::EventCategory() != Query::String("cat1"), &found); in TEST_F()
263 ASSERT_EQ(2u, found.size()); in TEST_F()
264 EXPECT_STREQ("name3", found[0]->name.c_str()); in TEST_F()
265 EXPECT_STREQ("name4", found[1]->name.c_str()); in TEST_F()
267 analyzer->FindEvents(Query::EventArg("num") != Query::Int(2), &found); in TEST_F()
268 ASSERT_EQ(3u, found.size()); in TEST_F()
269 EXPECT_STREQ("name1", found[0]->name.c_str()); in TEST_F()
270 EXPECT_STREQ("name3", found[1]->name.c_str()); in TEST_F()
271 EXPECT_STREQ("name4", found[2]->name.c_str()); in TEST_F()
274 analyzer->FindEvents(Query::EventArg("num") < Query::Int(2), &found); in TEST_F()
275 ASSERT_EQ(1u, found.size()); in TEST_F()
276 EXPECT_STREQ("name1", found[0]->name.c_str()); in TEST_F()
279 analyzer->FindEvents(Query::EventArg("num") <= Query::Int(2), &found); in TEST_F()
280 ASSERT_EQ(2u, found.size()); in TEST_F()
281 EXPECT_STREQ("name1", found[0]->name.c_str()); in TEST_F()
282 EXPECT_STREQ("name2", found[1]->name.c_str()); in TEST_F()
285 analyzer->FindEvents(Query::EventArg("num") > Query::Int(3), &found); in TEST_F()
286 ASSERT_EQ(1u, found.size()); in TEST_F()
287 EXPECT_STREQ("name4", found[0]->name.c_str()); in TEST_F()
290 analyzer->FindEvents(Query::EventArg("num") >= Query::Int(4), &found); in TEST_F()
291 ASSERT_EQ(1u, found.size()); in TEST_F()
292 EXPECT_STREQ("name4", found[0]->name.c_str()); in TEST_F()
296 Query::EventArg("num") < Query::Int(3), &found); in TEST_F()
297 ASSERT_EQ(1u, found.size()); in TEST_F()
298 EXPECT_STREQ("name2", found[0]->name.c_str()); in TEST_F()
302 Query::EventArg("num") == Query::Int(3), &found); in TEST_F()
303 ASSERT_EQ(2u, found.size()); in TEST_F()
304 EXPECT_STREQ("name1", found[0]->name.c_str()); in TEST_F()
305 EXPECT_STREQ("name3", found[1]->name.c_str()); in TEST_F()
309 Query::EventArg("num") == Query::Int(3)), &found); in TEST_F()
310 ASSERT_EQ(2u, found.size()); in TEST_F()
311 EXPECT_STREQ("name2", found[0]->name.c_str()); in TEST_F()
312 EXPECT_STREQ("name4", found[1]->name.c_str()); in TEST_F()
337 TraceEventVector found; in TEST_F() local
343 Query::Int(20), &found); in TEST_F()
344 EXPECT_EQ(1u, found.size()); in TEST_F()
345 EXPECT_STREQ("math2", found.front()->name.c_str()); in TEST_F()
349 Query::Int(5), &found); in TEST_F()
350 EXPECT_EQ(1u, found.size()); in TEST_F()
351 EXPECT_STREQ("math1", found.front()->name.c_str()); in TEST_F()
355 Query::Int(50), &found); in TEST_F()
356 EXPECT_EQ(1u, found.size()); in TEST_F()
357 EXPECT_STREQ("math1", found.front()->name.c_str()); in TEST_F()
361 Query::Int(2), &found); in TEST_F()
362 EXPECT_EQ(1u, found.size()); in TEST_F()
363 EXPECT_STREQ("math1", found.front()->name.c_str()); in TEST_F()
367 Query::Int(0), &found); in TEST_F()
368 EXPECT_EQ(2u, found.size()); in TEST_F()
371 analyzer->FindEvents(-Query::EventArg("b") == Query::Int(-10), &found); in TEST_F()
372 EXPECT_EQ(1u, found.size()); in TEST_F()
373 EXPECT_STREQ("math2", found.front()->name.c_str()); in TEST_F()
393 TraceEventVector found; in TEST_F() local
395 analyzer->FindEvents(Query::EventName() == Query::Pattern("name?"), &found); in TEST_F()
396 ASSERT_EQ(2u, found.size()); in TEST_F()
397 EXPECT_STREQ("name1", found[0]->name.c_str()); in TEST_F()
398 EXPECT_STREQ("name2", found[1]->name.c_str()); in TEST_F()
400 analyzer->FindEvents(Query::EventName() == Query::Pattern("name*"), &found); in TEST_F()
401 ASSERT_EQ(3u, found.size()); in TEST_F()
402 EXPECT_STREQ("name1", found[0]->name.c_str()); in TEST_F()
403 EXPECT_STREQ("name2", found[1]->name.c_str()); in TEST_F()
404 EXPECT_STREQ("name3x", found[2]->name.c_str()); in TEST_F()
406 analyzer->FindEvents(Query::EventName() != Query::Pattern("name*"), &found); in TEST_F()
407 ASSERT_EQ(1u, found.size()); in TEST_F()
408 EXPECT_STREQ("no match", found[0]->name.c_str()); in TEST_F()
443 TraceEventVector found; in TEST_F() local
451 &found); in TEST_F()
452 ASSERT_EQ(2u, found.size()); in TEST_F()
453 EXPECT_STREQ("name1", found[0]->name.c_str()); in TEST_F()
454 EXPECT_STREQ("name3", found[1]->name.c_str()); in TEST_F()
485 TraceEventVector found; in TEST_F() local
492 &found); in TEST_F()
493 ASSERT_EQ(2u, found.size()); in TEST_F()
494 EXPECT_STREQ("name1", found[0]->name.c_str()); in TEST_F()
495 EXPECT_STREQ("name3", found[1]->name.c_str()); in TEST_F()
517 TraceEventVector found; in TEST_F() local
518 analyzer->FindEvents(Query::MatchBeginWithEnd(), &found); in TEST_F()
519 ASSERT_EQ(1u, found.size()); in TEST_F()
520 EXPECT_STREQ("name2", found[0]->name.c_str()); in TEST_F()
540 TraceEventVector found; in TEST_F() local
541 analyzer->FindEvents(Query::MatchBeginName("name1"), &found); in TEST_F()
542 ASSERT_EQ(1u, found.size()); in TEST_F()
544 EXPECT_FALSE(found[0]->GetArgAsString("arg", &arg_actual)); in TEST_F()
547 EXPECT_TRUE(found[0]->GetArgAsString("arg", &arg_actual)); in TEST_F()
573 TraceEventVector found; in TEST_F() local
574 analyzer->FindEvents(Query::MatchAsyncBeginWithNext(), &found); in TEST_F()
575 ASSERT_EQ(2u, found.size()); in TEST_F()
576 EXPECT_STRCASEEQ("0xb", found[0]->id.c_str()); in TEST_F()
577 EXPECT_STRCASEEQ("0xc", found[1]->id.c_str()); in TEST_F()
605 TraceEventVector found; in TEST_F() local
606 analyzer->FindEvents(Query::MatchAsyncBeginWithNext(), &found); in TEST_F()
607 ASSERT_EQ(3u, found.size()); in TEST_F()
609 EXPECT_STRCASEEQ("0xb", found[0]->id.c_str()); in TEST_F()
610 EXPECT_EQ(TRACE_EVENT_PHASE_ASYNC_STEP_PAST, found[0]->other_event->phase); in TEST_F()
611 EXPECT_EQ(found[0], found[0]->other_event->prev_event); in TEST_F()
612 EXPECT_TRUE(found[0]->other_event->other_event); in TEST_F()
614 found[0]->other_event->other_event->phase); in TEST_F()
615 EXPECT_EQ(found[0]->other_event, in TEST_F()
616 found[0]->other_event->other_event->prev_event); in TEST_F()
618 EXPECT_STRCASEEQ("0xc", found[1]->id.c_str()); in TEST_F()
619 EXPECT_EQ(TRACE_EVENT_PHASE_ASYNC_STEP_INTO, found[1]->other_event->phase); in TEST_F()
620 EXPECT_EQ(found[1], found[1]->other_event->prev_event); in TEST_F()
621 EXPECT_TRUE(found[1]->other_event->other_event); in TEST_F()
623 found[1]->other_event->other_event->phase); in TEST_F()
624 EXPECT_EQ(found[1]->other_event, in TEST_F()
625 found[1]->other_event->other_event->prev_event); in TEST_F()
627 EXPECT_TRUE(found[1]->other_event->other_event->GetArgAsNumber( in TEST_F()
630 EXPECT_TRUE(found[1]->other_event->other_event->other_event); in TEST_F()
632 found[1]->other_event->other_event->other_event->phase); in TEST_F()
634 EXPECT_STRCASEEQ("0xa", found[2]->id.c_str()); in TEST_F()
635 EXPECT_EQ(TRACE_EVENT_PHASE_ASYNC_STEP_INTO, found[2]->other_event->phase); in TEST_F()
669 TraceEventVector found; in TEST_F() local
673 Query::EventHasOther(), &found); in TEST_F()
674 EXPECT_EQ(0u, found.size()); in TEST_F()
678 !Query::EventHasOther(), &found); in TEST_F()
679 EXPECT_EQ(1u, found.size()); in TEST_F()
683 !Query::EventHasOther(), &found); in TEST_F()
684 EXPECT_EQ(1u, found.size()); in TEST_F()
688 Query::OtherCategory() == Query::String("cat4"), &found); in TEST_F()
689 EXPECT_EQ(1u, found.size()); in TEST_F()
693 Query::OtherCategory() == Query::String("cat2"), &found); in TEST_F()
694 EXPECT_EQ(0u, found.size()); in TEST_F()
698 Query::OtherCategory() == Query::String("cat5"), &found); in TEST_F()
699 EXPECT_EQ(1u, found.size()); in TEST_F()
703 Query::OtherCategory() == Query::String("cat3"), &found); in TEST_F()
704 EXPECT_EQ(0u, found.size()); in TEST_F()