Lines Matching refs:timeMachine

605   android::mediametrics::TimeMachine timeMachine;  in TEST()  local
606 ASSERT_EQ(NO_ERROR, timeMachine.put(item, true)); in TEST()
610 ASSERT_EQ(NO_ERROR, timeMachine.get("Key", "i32", &i32, -1)); in TEST()
614 ASSERT_EQ(NO_ERROR, timeMachine.get("Key", "i64", &i64, -1)); in TEST()
618 ASSERT_EQ(NO_ERROR, timeMachine.get("Key", "double", &d, -1)); in TEST()
622 ASSERT_EQ(NO_ERROR, timeMachine.get("Key", "string", &s, -1)); in TEST()
627 ASSERT_EQ(NO_ERROR, timeMachine.get("Key.i32", &i32, -1)); in TEST()
631 ASSERT_EQ(NO_ERROR, timeMachine.get("Key.i64", &i64, -1)); in TEST()
635 ASSERT_EQ(NO_ERROR, timeMachine.get("Key.double", &d, -1)); in TEST()
639 ASSERT_EQ(NO_ERROR, timeMachine.get("Key.string", &s, -1)); in TEST()
648 android::mediametrics::TimeMachine timeMachine; in TEST() local
649 ASSERT_EQ(NO_ERROR, timeMachine.put(item, true)); in TEST()
656 ASSERT_EQ(NO_ERROR, timeMachine.put(item2, true)); in TEST()
662 ASSERT_EQ(NO_ERROR, timeMachine.put(item3, false)); // remote keys not allowed. in TEST()
666 ASSERT_EQ(NO_ERROR, timeMachine.get("Key1.one", &i32, -1)); in TEST()
669 ASSERT_EQ(NO_ERROR, timeMachine.get("Key1.two", &i32, -1)); in TEST()
672 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.three", &i32, -1)); in TEST()
674 ASSERT_EQ(NO_ERROR, timeMachine.get("Key2.three", &i32, -1)); in TEST()
677 ASSERT_EQ(NO_ERROR, timeMachine.get("Key1.four", &i32, -1)); in TEST()
680 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key2.four", &i32, -1)); in TEST()
682 ASSERT_EQ(NO_ERROR, timeMachine.get("Key1.five", &i32, -1)); in TEST()
685 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key2.five", &i32, -1)); in TEST()
687 ASSERT_EQ(NO_ERROR, timeMachine.get("Key2.six", &i32, -1)); in TEST()
690 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key2.seven", &i32, -1)); in TEST()
699 android::mediametrics::TimeMachine timeMachine(1, 2); // keep at most 2 keys. in TEST() local
701 ASSERT_EQ((size_t)0, timeMachine.size()); in TEST()
703 ASSERT_EQ(NO_ERROR, timeMachine.put(item, true)); in TEST()
705 ASSERT_EQ((size_t)1, timeMachine.size()); in TEST()
712 ASSERT_EQ(NO_ERROR, timeMachine.put(item2, true)); in TEST()
713 ASSERT_EQ((size_t)2, timeMachine.size()); in TEST()
723 ASSERT_EQ(NO_ERROR, timeMachine.put(item3, true)); in TEST()
725 ASSERT_EQ((size_t)2, timeMachine.size()); in TEST()
729 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.one", &i32, -1)); in TEST()
730 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.two", &i32, -1)); in TEST()
731 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.three", &i32, -1)); in TEST()
732 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.four", &i32, -1)); in TEST()
733 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.five", &i32, -1)); in TEST()
735 ASSERT_EQ(NO_ERROR, timeMachine.get("Key2.three", &i32, -1)); in TEST()
738 ASSERT_EQ(NO_ERROR, timeMachine.get("Key3.six", &i32, -1)); in TEST()
741 printf("After\n%s\n", timeMachine.dump().first.c_str()); in TEST()