| 524 | // ── Empty struct ── |
| 525 | |
| 526 | void testEmptyStruct() { |
| 527 | rcx::NodeTree tree; |
| 528 | rcx::Node root; |
| 529 | root.kind = rcx::NodeKind::Struct; |
| 530 | root.name = "Empty"; |
| 531 | root.structTypeName = "Empty"; |
| 532 | root.parentId = 0; |
| 533 | tree.addNode(root); |
| 534 | |
| 535 | QString result = rcx::renderCpp(tree, tree.nodes[0].id); |
| 536 | |
| 537 | QVERIFY(result.contains("struct Empty {")); |
| 538 | QVERIFY(result.contains("};")); |
| 539 | QVERIFY(result.contains("static_assert(sizeof(Empty) == 0x0")); |
| 540 | } |
| 541 | |
| 542 | // ── Name sanitization ── |
| 543 |