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

Method testVec3SingleLine

tests/test_compose.cpp:58–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 }
57
58 void testVec3SingleLine() {
59 NodeTree tree;
60 tree.baseAddress = 0;
61
62 Node root;
63 root.kind = NodeKind::Struct;
64 root.name = "Root";
65 root.parentId = 0;
66 int ri = tree.addNode(root);
67 uint64_t rootId = tree.nodes[ri].id;
68
69 Node v;
70 v.kind = NodeKind::Vec3;
71 v.name = "pos";
72 v.parentId = rootId;
73 v.offset = 0;
74 tree.addNode(v);
75
76 NullProvider prov;
77 ComposeResult result = compose(tree, prov);
78
79 // CommandRow + 1 Vec3 line + root footer = 3
80 QCOMPARE(result.meta.size(), 3);
81
82 // Line 1: single Vec3 line, not continuation, depth 1
83 QVERIFY(!result.meta[1].isContinuation);
84 QCOMPARE(result.meta[1].offsetText, QString("0000 "));
85 QCOMPARE(result.meta[1].depth, 1);
86 QCOMPARE(result.meta[1].nodeKind, NodeKind::Vec3);
87
88 // Line 2 is root footer
89 QCOMPARE(result.meta[2].lineKind, LineKind::Footer);
90 }
91
92 void testPaddingMarker() {
93 NodeTree tree;

Callers

nothing calls this directly

Calls 3

composeFunction · 0.85
addNodeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected