Lines Matching refs:store

111   PropertyStore store(Bind(&PropertyStoreTest::TestCallback,  in TEST_P()  local
115 EXPECT_FALSE(store.SetAnyProperty("", GetParam(), &error)); in TEST_P()
138 PropertyStore* store, const string& name, Error* error);
144 PropertyStore store(Bind(&PropertyStoreTest::TestCallback, in TYPED_TEST() local
148 PropertyStoreTest::RegisterProperty(&store, "some property", &property); in TYPED_TEST()
149 EXPECT_TRUE(store.Contains("some property")); in TYPED_TEST()
153 PropertyStore store(Bind(&PropertyStoreTest::TestCallback, in TYPED_TEST() local
157 PropertyStoreTest::RegisterProperty(&store, "some property", &property); in TYPED_TEST()
162 store, "some property", &read_value, &error)); in TYPED_TEST()
167 PropertyStore store(Bind(&PropertyStoreTest::TestCallback, in TYPED_TEST() local
171 PropertyStoreTest::RegisterProperty(&store, "some property", &property); in TYPED_TEST()
173 EXPECT_TRUE(store.ClearProperty("some property", &error)); in TYPED_TEST()
177 PropertyStore store(Bind(&PropertyStoreTest::TestCallback, in TYPED_TEST() local
181 PropertyStoreTest::RegisterProperty(&store, "some property", &property); in TYPED_TEST()
187 EXPECT_TRUE(this->SetProperty(&store, "some property", &error)); in TYPED_TEST()
188 EXPECT_FALSE(this->SetProperty(&store, "some property", &error)); in TYPED_TEST()
192 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
194 return store->SetBoolProperty(name, new_value, error); in SetProperty()
198 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
200 return store->SetInt16Property(name, new_value, error); in SetProperty()
204 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
206 return store->SetInt32Property(name, new_value, error); in SetProperty()
210 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
212 return store->SetStringProperty(name, new_value, error); in SetProperty()
216 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
219 return store->SetStringmapProperty(name, new_value, error); in SetProperty()
223 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
226 return store->SetStringmapsProperty(name, new_value, error); in SetProperty()
230 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
233 return store->SetStringsProperty(name, new_value, error); in SetProperty()
237 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
239 return store->SetUint8Property(name, new_value, error); in SetProperty()
243 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
245 return store->SetUint16Property(name, new_value, error); in SetProperty()
249 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
251 return store->SetUint16sProperty(name, new_value, error); in SetProperty()
255 PropertyStore* store, const string& name, Error* error) { in SetProperty() argument
257 return store->SetUint32Property(name, new_value, error); in SetProperty()
267 PropertyStore store; in TEST_F() local
272 store.RegisterBool("some bool", &flag); in TEST_F()
274 EXPECT_TRUE(store.ClearProperty("some bool", &error)); in TEST_F()
280 PropertyStore store(Bind(&PropertyStoreTest::TestCallback, in TEST_F() local
285 EXPECT_FALSE(store.ClearProperty("", &error)); in TEST_F()
292 PropertyStore store(Bind(&PropertyStoreTest::TestCallback, in TEST_F() local
297 EXPECT_FALSE(store.SetAnyProperty( in TEST_F()
305 PropertyStore store(Bind(&PropertyStoreTest::TestCallback, in TEST_F() local
309 EXPECT_FALSE(store.SetAnyProperty( in TEST_F()
315 PropertyStore store(Bind(&PropertyStoreTest::TestCallback, in TEST_F() local
320 store.RegisterDerivedKeyValueStore( in TEST_F()
329 EXPECT_TRUE(store.SetAnyProperty(kKey, kKeyValueStoreV, &error)); in TEST_F()
335 PropertyStore store; in TEST_F() local
339 store.RegisterWriteOnlyBool(keys[0], &values[0]); in TEST_F()
340 store.RegisterBool(keys[1], &values[1]); in TEST_F()
342 ReadablePropertyConstIterator<bool> it = store.GetBoolPropertiesIter(); in TEST_F()
350 EXPECT_FALSE(store.GetBoolProperty(keys[0], nullptr, &errors[0])); in TEST_F()
353 EXPECT_TRUE(store.GetBoolProperty(keys[1], &test_value, &errors[1])); in TEST_F()
360 store.RegisterWriteOnlyInt16(keys[0], &values[0]); in TEST_F()
361 store.RegisterInt16(keys[1], &values[1]); in TEST_F()
363 ReadablePropertyConstIterator<int16_t> it = store.GetInt16PropertiesIter(); in TEST_F()
371 EXPECT_FALSE(store.GetInt16Property(keys[0], nullptr, &errors[0])); in TEST_F()
374 EXPECT_TRUE(store.GetInt16Property(keys[1], &test_value, &errors[1])); in TEST_F()
381 store.RegisterWriteOnlyInt32(keys[0], &values[0]); in TEST_F()
382 store.RegisterInt32(keys[1], &values[1]); in TEST_F()
384 ReadablePropertyConstIterator<int32_t> it = store.GetInt32PropertiesIter(); in TEST_F()
392 EXPECT_FALSE(store.GetInt32Property(keys[0], nullptr, &errors[0])); in TEST_F()
395 EXPECT_TRUE(store.GetInt32Property(keys[1], &test_value, &errors[1])); in TEST_F()
402 store.RegisterWriteOnlyString(keys[0], &values[0]); in TEST_F()
403 store.RegisterString(keys[1], &values[1]); in TEST_F()
405 ReadablePropertyConstIterator<string> it = store.GetStringPropertiesIter(); in TEST_F()
413 EXPECT_FALSE(store.GetStringProperty(keys[0], nullptr, &errors[0])); in TEST_F()
416 EXPECT_TRUE(store.GetStringProperty(keys[1], &test_value, &errors[1])); in TEST_F()
425 store.RegisterWriteOnlyStringmap(keys[0], &values[0]); in TEST_F()
426 store.RegisterStringmap(keys[1], &values[1]); in TEST_F()
429 store.GetStringmapPropertiesIter(); in TEST_F()
437 EXPECT_FALSE(store.GetStringmapProperty(keys[0], nullptr, &errors[0])); in TEST_F()
440 EXPECT_TRUE(store.GetStringmapProperty(keys[1], &test_value, &errors[1])); in TEST_F()
453 store.RegisterWriteOnlyStringmaps(keys[0], &values[0]); in TEST_F()
454 store.RegisterStringmaps(keys[1], &values[1]); in TEST_F()
457 store.GetStringmapsPropertiesIter(); in TEST_F()
465 EXPECT_FALSE(store.GetStringmapsProperty(keys[0], nullptr, &errors[0])); in TEST_F()
468 EXPECT_TRUE(store.GetStringmapsProperty(keys[1], &test_value, &errors[1])); in TEST_F()
480 store.RegisterWriteOnlyStrings(keys[0], &values[0]); in TEST_F()
481 store.RegisterStrings(keys[1], &values[1]); in TEST_F()
484 store.GetStringsPropertiesIter(); in TEST_F()
492 EXPECT_FALSE(store.GetStringsProperty(keys[0], nullptr, &errors[0])); in TEST_F()
495 EXPECT_TRUE(store.GetStringsProperty(keys[1], &test_value, &errors[1])); in TEST_F()
502 store.RegisterWriteOnlyUint8(keys[0], &values[0]); in TEST_F()
503 store.RegisterUint8(keys[1], &values[1]); in TEST_F()
505 ReadablePropertyConstIterator<uint8_t> it = store.GetUint8PropertiesIter(); in TEST_F()
513 EXPECT_FALSE(store.GetUint8Property(keys[0], nullptr, &errors[0])); in TEST_F()
516 EXPECT_TRUE(store.GetUint8Property(keys[1], &test_value, &errors[1])); in TEST_F()
523 store.RegisterWriteOnlyUint16(keys[0], &values[0]); in TEST_F()
524 store.RegisterUint16(keys[1], &values[1]); in TEST_F()
527 store.GetUint16PropertiesIter(); in TEST_F()
535 EXPECT_FALSE(store.GetUint16Property(keys[0], nullptr, &errors[0])); in TEST_F()
538 EXPECT_TRUE(store.GetUint16Property(keys[1], &test_value, &errors[1])); in TEST_F()
547 PropertyStore store; in TEST_F() local
552 store.RegisterBool(key, &value); in TEST_F()
557 EXPECT_TRUE(store.GetBoolProperty(key, &test_value, &error)); in TEST_F()
562 EXPECT_TRUE(store.SetAnyProperty(key, brillo::Any(new_value), &error)); in TEST_F()
563 EXPECT_TRUE(store.GetBoolProperty(key, &test_value, &error)); in TEST_F()
570 store.RegisterInt16(key, &value); in TEST_F()
575 EXPECT_TRUE(store.GetInt16Property(key, &test_value, &error)); in TEST_F()
580 EXPECT_TRUE(store.SetAnyProperty(key, brillo::Any(new_value), &error)); in TEST_F()
581 EXPECT_TRUE(store.GetInt16Property(key, &test_value, &error)); in TEST_F()
588 store.RegisterInt32(key, &value); in TEST_F()
593 EXPECT_TRUE(store.GetInt32Property(key, &test_value, &error)); in TEST_F()
598 EXPECT_TRUE(store.SetAnyProperty(key, brillo::Any(new_value), &error)); in TEST_F()
599 EXPECT_TRUE(store.GetInt32Property(key, &test_value, &error)); in TEST_F()
606 store.RegisterString(key, &value); in TEST_F()
611 EXPECT_TRUE(store.GetStringProperty(key, &test_value, &error)); in TEST_F()
616 EXPECT_TRUE(store.SetAnyProperty(key, brillo::Any(new_value), &error)); in TEST_F()
617 EXPECT_TRUE(store.GetStringProperty(key, &test_value, &error)); in TEST_F()
625 store.RegisterStringmap(key, &value); in TEST_F()
630 EXPECT_TRUE(store.GetStringmapProperty(key, &test_value, &error)); in TEST_F()
636 EXPECT_TRUE(store.SetAnyProperty(key, brillo::Any(new_value), &error)); in TEST_F()
637 EXPECT_TRUE(store.GetStringmapProperty(key, &test_value, &error)); in TEST_F()
647 store.RegisterStrings(key, &value); in TEST_F()
652 EXPECT_TRUE(store.GetStringsProperty(key, &test_value, &error)); in TEST_F()
660 EXPECT_TRUE(store.SetAnyProperty(key, brillo::Any(new_value), &error)); in TEST_F()
661 EXPECT_TRUE(store.GetStringsProperty(key, &test_value, &error)); in TEST_F()
668 store.RegisterUint8(key, &value); in TEST_F()
673 EXPECT_TRUE(store.GetUint8Property(key, &test_value, &error)); in TEST_F()
678 EXPECT_TRUE(store.SetAnyProperty(key, brillo::Any(new_value), &error)); in TEST_F()
679 EXPECT_TRUE(store.GetUint8Property(key, &test_value, &error)); in TEST_F()
686 store.RegisterUint16(key, &value); in TEST_F()
691 EXPECT_TRUE(store.GetUint16Property(key, &test_value, &error)); in TEST_F()
696 EXPECT_TRUE(store.SetAnyProperty(key, brillo::Any(new_value), &error)); in TEST_F()
697 EXPECT_TRUE(store.GetUint16Property(key, &test_value, &error)); in TEST_F()
704 store.RegisterUint32(key, &value); in TEST_F()
709 EXPECT_TRUE(store.GetUint32Property(key, &test_value, &error)); in TEST_F()
714 EXPECT_TRUE(store.SetAnyProperty(key, brillo::Any(new_value), &error)); in TEST_F()
715 EXPECT_TRUE(store.GetUint32Property(key, &test_value, &error)); in TEST_F()
724 store.RegisterDerivedKeyValueStore( in TEST_F()
734 EXPECT_TRUE(store.SetAnyProperty(key, brillo::Any(value), &error)); in TEST_F()
739 PropertyStore store; in TEST_F() local
764 store.RegisterBool(kBoolKey, &bool_value); in TEST_F()
765 store.RegisterInt16(kInt16Key, &int16_value); in TEST_F()
766 store.RegisterInt32(kInt32Key, &int32_value); in TEST_F()
767 store.RegisterString(kStringKey, &string_value); in TEST_F()
768 store.RegisterStrings(kStringsKey, &strings_value); in TEST_F()
769 store.RegisterStringmap(kStringmapKey, &stringmap_value); in TEST_F()
770 store.RegisterUint8(kUint8Key, &uint8_value); in TEST_F()
771 store.RegisterUint16(kUint16Key, &uint16_value); in TEST_F()
772 store.RegisterUint32(kUint32Key, &uint32_value); in TEST_F()
777 store.RegisterDerivedKeyValueStore( in TEST_F()
814 EXPECT_TRUE(store.SetProperties(dict, &error)); in TEST_F()
820 EXPECT_TRUE(store.GetProperties(&result_dict, &error)); in TEST_F()