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

Method testByteSizeDynamic

tests/test_core.cpp:160–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 }
159
160 void testByteSizeDynamic() {
161 rcx::Node n;
162 n.kind = rcx::NodeKind::UTF8;
163 n.strLen = 128;
164 QCOMPARE(n.byteSize(), 128);
165
166 n.kind = rcx::NodeKind::UTF16;
167 n.strLen = 32;
168 QCOMPARE(n.byteSize(), 64); // 32 * 2
169
170 n.kind = rcx::NodeKind::Float;
171 QCOMPARE(n.byteSize(), 4); // falls back to sizeForKind
172 }
173
174 void testSubtreeCycleSafe() {
175 rcx::NodeTree tree;

Callers

nothing calls this directly

Calls 1

byteSizeMethod · 0.80

Tested by

no test coverage detected