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

Method checkRead

Tests/EncoderTests.cc:79–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77 }
78
79 void checkRead(int64_t i) {
80 auto v = Value::fromData(result);
81 if (!v || v->type() != kNumber || !v->isInteger() || v->isUnsigned() || v->asInt() != i || v->asDouble() != (double)i) {
82 REQUIRE(v != nullptr);
83 REQUIRE(v->type() == kNumber);
84 REQUIRE(v->isInteger());
85 REQUIRE(!v->isUnsigned());
86 REQUIRE(v->asInt() == i);
87 REQUIRE(v->asDouble() == (double)i);
88 }
89 }
90
91 void checkReadU(uint64_t i) {
92 auto v = Value::fromData(result);

Callers

nothing calls this directly

Calls 5

typeMethod · 0.45
isIntegerMethod · 0.45
isUnsignedMethod · 0.45
asIntMethod · 0.45
asDoubleMethod · 0.45

Tested by

no test coverage detected