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

Method testInt16Overflow

tests/test_validation.cpp:217–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215 }
216
217 void testInt16Overflow() {
218 bool ok;
219 fmt::parseValue(NodeKind::Int16, "32768", &ok);
220 QVERIFY2(!ok, "32768 overflows int16");
221
222 fmt::parseValue(NodeKind::Int16, "-32769", &ok);
223 QVERIFY2(!ok, "-32769 underflows int16");
224
225 fmt::parseValue(NodeKind::Int16, "32767", &ok);
226 QVERIFY(ok);
227
228 fmt::parseValue(NodeKind::Int16, "-32768", &ok);
229 QVERIFY(ok);
230
231 fmt::parseValue(NodeKind::Int16, "0x10000", &ok);
232 QVERIFY2(!ok, "0x10000 overflows int16 hex");
233 }
234
235 void testUInt16Overflow() {
236 bool ok;

Callers

nothing calls this directly

Calls 1

parseValueFunction · 0.85

Tested by

no test coverage detected