MCPcopy Create free account
hub / github.com/IChooseYou/Reclass / testParseValueFloat

Method testParseValueFloat

tests/test_format.cpp:101–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 void testParseValueFloat() {
102 bool ok;
103 QByteArray b = fmt::parseValue(NodeKind::Float, "3.14", &ok);
104 QVERIFY(ok);
105 QCOMPARE(b.size(), 4);
106 float v;
107 memcpy(&v, b.data(), 4);
108 QVERIFY(qAbs(v - 3.14f) < 0.01f);
109 }
110
111 void testParseValueHex32() {
112 bool ok;

Callers

nothing calls this directly

Calls 2

parseValueFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected