MCPcopy Create free account
hub / github.com/couchbase/fleece / lookupNameWithKey

Method lookupNameWithKey

Tests/EncoderTests.cc:195–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193 }
194
195 void lookupNameWithKey(const Dict* person, Dict::key &nameKey, std::string expectedName) {
196 REQUIRE(person);
197 const Value *name = person->get(nameKey);
198 REQUIRE(name);
199 std::string nameStr = (std::string)name->asString();
200 REQUIRE(nameStr == expectedName);
201
202 // Second lookup (using cache)
203 name = person->get(nameKey);
204 REQUIRE(name);
205 nameStr = (std::string)name->asString();
206 REQUIRE(nameStr == expectedName);
207 }
208
209 void writeKey(int key) {
210 enc.writeKey(key);

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
asStringMethod · 0.45

Tested by

no test coverage detected