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

Method testPaddingMarker

tests/test_compose.cpp:92–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 }
91
92 void testPaddingMarker() {
93 NodeTree tree;
94 tree.baseAddress = 0;
95
96 Node root;
97 root.kind = NodeKind::Struct;
98 root.name = "R";
99 root.parentId = 0;
100 int ri = tree.addNode(root);
101 uint64_t rootId = tree.nodes[ri].id;
102
103 Node pad;
104 pad.kind = NodeKind::Padding;
105 pad.name = "pad";
106 pad.parentId = rootId;
107 pad.offset = 0;
108 tree.addNode(pad);
109
110 NullProvider prov;
111 ComposeResult result = compose(tree, prov);
112
113 // CommandRow + padding + root footer = 3
114 QCOMPARE(result.meta.size(), 3);
115 QVERIFY(result.meta[1].markerMask & (1u << M_PAD));
116 QCOMPARE(result.meta[1].depth, 1);
117
118 // Line 2 is root footer
119 QCOMPARE(result.meta[2].lineKind, LineKind::Footer);
120 }
121
122 void testNullPointerMarker() {
123 NodeTree tree;

Callers

nothing calls this directly

Calls 3

composeFunction · 0.85
addNodeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected