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

Method testBaseAddressDisplay

tests/test_editor.cpp:695–713  ·  view source on GitHub ↗

── Test: composed text does not contain "// base:" (moved to cmd bar) ──

Source from the content-addressed store, hash-verified

693
694 // ── Test: composed text does not contain "// base:" (moved to cmd bar) ──
695 void testBaseAddressDisplay() {
696 NodeTree tree = makeTestTree();
697 tree.baseAddress = 0x10;
698 BufferProvider prov = makeTestProvider();
699 ComposeResult result = compose(tree, prov);
700
701 m_editor->applyDocument(result);
702
703 // Root header is suppressed; verify no "// base:" anywhere in output
704 QVERIFY2(!result.text.contains("// base:"),
705 "Composed text should not contain '// base:' (consolidated into cmd bar)");
706
707 // kFirstDataLine should be the first field (root header suppressed)
708 const LineMeta* lm = m_editor->metaForLine(kFirstDataLine);
709 QVERIFY(lm);
710 QCOMPARE(lm->lineKind, LineKind::Field);
711
712 m_editor->applyDocument(m_result);
713 }
714
715 // ── Test: CommandRow ADDR span is valid ──
716 void testBaseAddressSpan() {

Callers

nothing calls this directly

Calls 5

makeTestProviderFunction · 0.85
composeFunction · 0.85
applyDocumentMethod · 0.80
metaForLineMethod · 0.80
makeTestTreeFunction · 0.70

Tested by

no test coverage detected