| 279 | } |
| 280 | |
| 281 | void testComputeOffsetLarge() { |
| 282 | // Verify computeOffset returns int64_t that doesn't overflow |
| 283 | rcx::NodeTree tree; |
| 284 | rcx::Node root; root.kind = rcx::NodeKind::Struct; root.name = "R"; |
| 285 | root.parentId = 0; root.offset = 0; |
| 286 | int ri = tree.addNode(root); |
| 287 | uint64_t rootId = tree.nodes[ri].id; |
| 288 | |
| 289 | rcx::Node child; child.kind = rcx::NodeKind::Hex8; child.name = "f"; |
| 290 | child.parentId = rootId; child.offset = 0x7FFFFFFF; // max int32 |
| 291 | tree.addNode(child); |
| 292 | |
| 293 | int64_t off = tree.computeOffset(1); |
| 294 | QCOMPARE(off, (int64_t)0x7FFFFFFF); |
| 295 | } |
| 296 | |
| 297 | void testKindMetaCompleteness() { |
| 298 | // Every NodeKind enum value must have a KindMeta entry |
nothing calls this directly
no test coverage detected