| 1 | import v.ast |
| 2 | import v.gen.wasm.serialise |
| 3 | |
| 4 | fn test_alignment() { |
| 5 | table := ast.new_table() |
| 6 | |
| 7 | mut pool := serialise.new_pool(table) |
| 8 | pool.append(ast.BoolLiteral{ val: true }, 0) // +0, +1 |
| 9 | pool.append(ast.FloatLiteral{ val: '0' }, ast.f32_type) // +3, +4 |
| 10 | pool.append(ast.BoolLiteral{ val: true }, 0) // +0, +1 |
| 11 | assert pool.buf.len == 9 |
| 12 | } |
| 13 |