Lines Matching refs:timeMachine
574 android::mediametrics::TimeMachine timeMachine; in TEST() local
575 ASSERT_EQ(NO_ERROR, timeMachine.put(item, true)); in TEST()
579 ASSERT_EQ(NO_ERROR, timeMachine.get("Key", "i32", &i32, -1)); in TEST()
583 ASSERT_EQ(NO_ERROR, timeMachine.get("Key", "i64", &i64, -1)); in TEST()
587 ASSERT_EQ(NO_ERROR, timeMachine.get("Key", "double", &d, -1)); in TEST()
591 ASSERT_EQ(NO_ERROR, timeMachine.get("Key", "string", &s, -1)); in TEST()
596 ASSERT_EQ(NO_ERROR, timeMachine.get("Key.i32", &i32, -1)); in TEST()
600 ASSERT_EQ(NO_ERROR, timeMachine.get("Key.i64", &i64, -1)); in TEST()
604 ASSERT_EQ(NO_ERROR, timeMachine.get("Key.double", &d, -1)); in TEST()
608 ASSERT_EQ(NO_ERROR, timeMachine.get("Key.string", &s, -1)); in TEST()
617 android::mediametrics::TimeMachine timeMachine; in TEST() local
618 ASSERT_EQ(NO_ERROR, timeMachine.put(item, true)); in TEST()
625 ASSERT_EQ(NO_ERROR, timeMachine.put(item2, true)); in TEST()
631 ASSERT_EQ(NO_ERROR, timeMachine.put(item3, false)); // remote keys not allowed. in TEST()
635 ASSERT_EQ(NO_ERROR, timeMachine.get("Key1.one", &i32, -1)); in TEST()
638 ASSERT_EQ(NO_ERROR, timeMachine.get("Key1.two", &i32, -1)); in TEST()
641 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.three", &i32, -1)); in TEST()
643 ASSERT_EQ(NO_ERROR, timeMachine.get("Key2.three", &i32, -1)); in TEST()
646 ASSERT_EQ(NO_ERROR, timeMachine.get("Key1.four", &i32, -1)); in TEST()
649 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key2.four", &i32, -1)); in TEST()
651 ASSERT_EQ(NO_ERROR, timeMachine.get("Key1.five", &i32, -1)); in TEST()
654 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key2.five", &i32, -1)); in TEST()
656 ASSERT_EQ(NO_ERROR, timeMachine.get("Key2.six", &i32, -1)); in TEST()
659 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key2.seven", &i32, -1)); in TEST()
668 android::mediametrics::TimeMachine timeMachine(1, 2); // keep at most 2 keys. in TEST() local
670 ASSERT_EQ((size_t)0, timeMachine.size()); in TEST()
672 ASSERT_EQ(NO_ERROR, timeMachine.put(item, true)); in TEST()
674 ASSERT_EQ((size_t)1, timeMachine.size()); in TEST()
681 ASSERT_EQ(NO_ERROR, timeMachine.put(item2, true)); in TEST()
682 ASSERT_EQ((size_t)2, timeMachine.size()); in TEST()
692 ASSERT_EQ(NO_ERROR, timeMachine.put(item3, true)); in TEST()
694 ASSERT_EQ((size_t)2, timeMachine.size()); in TEST()
698 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.one", &i32, -1)); in TEST()
699 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.two", &i32, -1)); in TEST()
700 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.three", &i32, -1)); in TEST()
701 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.four", &i32, -1)); in TEST()
702 ASSERT_EQ(BAD_VALUE, timeMachine.get("Key1.five", &i32, -1)); in TEST()
704 ASSERT_EQ(NO_ERROR, timeMachine.get("Key2.three", &i32, -1)); in TEST()
707 ASSERT_EQ(NO_ERROR, timeMachine.get("Key3.six", &i32, -1)); in TEST()
710 printf("After\n%s\n", timeMachine.dump().first.c_str()); in TEST()