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

Method testUInt8Overflow

tests/test_validation.cpp:201–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199 }
200
201 void testUInt8Overflow() {
202 bool ok;
203 fmt::parseValue(NodeKind::UInt8, "256", &ok);
204 QVERIFY2(!ok, "256 overflows uint8");
205
206 fmt::parseValue(NodeKind::UInt8, "255", &ok);
207 QVERIFY(ok);
208
209 fmt::parseValue(NodeKind::UInt8, "0", &ok);
210 QVERIFY(ok);
211
212 // Negative should fail for unsigned
213 fmt::parseValue(NodeKind::UInt8, "-1", &ok);
214 QVERIFY2(!ok, "Negative should fail for uint8");
215 }
216
217 void testInt16Overflow() {
218 bool ok;

Callers

nothing calls this directly

Calls 1

parseValueFunction · 0.85

Tested by

no test coverage detected