| 244 | // ── Primitive array ── |
| 245 | |
| 246 | void testPrimitiveArray() { |
| 247 | rcx::NodeTree tree; |
| 248 | rcx::Node root; |
| 249 | root.kind = rcx::NodeKind::Struct; |
| 250 | root.name = "WithArray"; |
| 251 | root.structTypeName = "WithArray"; |
| 252 | root.parentId = 0; |
| 253 | int ri = tree.addNode(root); |
| 254 | uint64_t rootId = tree.nodes[ri].id; |
| 255 | |
| 256 | rcx::Node arr; |
| 257 | arr.kind = rcx::NodeKind::Array; |
| 258 | arr.name = "data"; |
| 259 | arr.parentId = rootId; |
| 260 | arr.offset = 0; |
| 261 | arr.arrayLen = 16; |
| 262 | arr.elementKind = rcx::NodeKind::UInt32; |
| 263 | tree.addNode(arr); |
| 264 | |
| 265 | QString result = rcx::renderCpp(tree, rootId); |
| 266 | QVERIFY(result.contains("uint32_t data[16];")); |
| 267 | } |
| 268 | |
| 269 | // ── Pointer fields ── |
| 270 | |