Home | History | Annotate | Download | only in tests

Lines Matching refs:Key

14 struct TestingKey : public SkResourceCache::Key {
22 TestingRec(const TestingKey& key, uint32_t value) : fKey(key), fValue(value) {}
27 const Key& getKey() const override { return fKey; }
47 TestingKey key(i);
50 REPORTER_ASSERT(reporter, !cache.find(key, TestingRec::Visitor, &value));
53 cache.add(new TestingRec(key, i));
55 REPORTER_ASSERT(reporter, cache.find(key, TestingRec::Visitor, &value));
62 TestingKey key(i);
63 cache.add(new TestingRec(key, i));
78 TestingKey key(i, i & 1); // every other key will have a 1 for its sharedID
79 cache.add(new TestingRec(key, i));
84 TestingKey key(i, i & 1); // every other key will have a 1 for its sharedID
87 REPORTER_ASSERT(reporter, cache.find(key, TestingRec::Visitor, &value));
96 TestingKey key(i, i & 1); // every other key will have a 1 for its sharedID
100 REPORTER_ASSERT(reporter, !cache.find(key, TestingRec::Visitor, &value));
102 REPORTER_ASSERT(reporter, cache.find(key, TestingRec::Visitor, &value));
141 // Adding the same key twice should be safe.
144 TestingKey key(1);
146 cache.add(new TestingRec(key, 2));
147 cache.add(new TestingRec(key, 3));
151 REPORTER_ASSERT(r, cache.find(key, TestingRec::Visitor, &value));