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

Method checkReadFloat

Tests/EncoderTests.cc:104–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102 }
103
104 void checkReadFloat(float f) {
105 auto v = Value::fromData(result);
106 REQUIRE(v != nullptr);
107 REQUIRE(v->type() == kNumber);
108 REQUIRE(!v->isDouble());
109 REQUIRE(v->asInt() == (int64_t)f);
110 REQUIRE(v->asFloat() == f);
111 REQUIRE(v->asDouble() == (double)f);
112 }
113
114 void checkReadDouble(double f) {
115 auto v = Value::fromData(result);

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected