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

Method testKindMetaCompleteness

tests/test_core.cpp:297–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295 }
296
297 void testKindMetaCompleteness() {
298 // Every NodeKind enum value must have a KindMeta entry
299 for (int i = 0; i <= static_cast<int>(rcx::NodeKind::Array); i++) {
300 auto kind = static_cast<rcx::NodeKind>(i);
301 const rcx::KindMeta* m = rcx::kindMeta(kind);
302 QVERIFY2(m != nullptr,
303 qPrintable(QString("Missing KindMeta for kind %1").arg(i)));
304 QCOMPARE(m->kind, kind);
305 QVERIFY(m->name != nullptr);
306 QVERIFY(m->typeName != nullptr);
307 QVERIFY(m->lines >= 1);
308 QVERIFY(m->align >= 1);
309 }
310 // sizeForKind/linesForKind/alignmentFor must agree with table
311 for (const auto& m : rcx::kKindMeta) {
312 QCOMPARE(rcx::sizeForKind(m.kind), m.size);
313 QCOMPARE(rcx::linesForKind(m.kind), m.lines);
314 QCOMPARE(rcx::alignmentFor(m.kind), m.align);
315 }
316 }
317
318 void testColumnSpan_field() {
319 rcx::LineMeta lm;

Callers

nothing calls this directly

Calls 4

kindMetaFunction · 0.85
sizeForKindFunction · 0.85
linesForKindFunction · 0.85
alignmentForFunction · 0.85

Tested by

no test coverage detected