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

Method testReadValueBoundsCheck

tests/test_format.cpp:233–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 }
232
233 void testReadValueBoundsCheck() {
234 // Vec2 single-line: subLine=0 returns all components
235 QByteArray data(16, '\0');
236 BufferProvider prov(data);
237 Node n;
238 n.kind = NodeKind::Vec2;
239 n.name = "v";
240 QVERIFY(fmt::readValue(n, prov, 0, 0).contains(","));
241
242 // Vec3 single-line: subLine=0 returns 3 comma-separated values
243 n.kind = NodeKind::Vec3;
244 QCOMPARE(fmt::readValue(n, prov, 0, 0).count(','), 2);
245
246 // Vec4 single-line: subLine=0 returns 4 comma-separated values
247 n.kind = NodeKind::Vec4;
248 QCOMPARE(fmt::readValue(n, prov, 0, 0).count(','), 3);
249 }
250
251 void testEditableValueBasic() {
252 QByteArray data(16, '\0');

Callers

nothing calls this directly

Calls 1

readValueFunction · 0.85

Tested by

no test coverage detected