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

Method checkReadDouble

Tests/EncoderTests.cc:114–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 }
113
114 void checkReadDouble(double f) {
115 auto v = Value::fromData(result);
116 REQUIRE(v != nullptr);
117 REQUIRE(v->type() == kNumber);
118 REQUIRE(v->asInt() == (int64_t)f);
119 REQUIRE(v->asDouble() == f);
120 REQUIRE(v->asFloat() == (float)f);
121 }
122
123 void checkReadString(const char *str) {
124 auto v = Value::fromData(result);

Callers

nothing calls this directly

Calls 4

typeMethod · 0.45
asIntMethod · 0.45
asDoubleMethod · 0.45
asFloatMethod · 0.45

Tested by

no test coverage detected