tests/cli/dump-elem-segments.wat
raw| 1 | ;; RUN: print % | dump |
| 2 | |
| 3 | ;; test that all forms of element segments can be round-tripped from |
| 4 | ;; text-to-binary. |
| 5 | (module |
| 6 | (table 1 1 funcref) |
| 7 | |
| 8 | (func $f) |
| 9 | |
| 10 | (elem (i32.const 0) func) ;; 0x00 |
| 11 | (elem func) ;; 0x01 |
| 12 | (elem (table 0) (i32.const 0) func) ;; 0x02 |
| 13 | (elem declare func) ;; 0x03 |
| 14 | (elem (i32.const 0) funcref) ;; 0x04 |
| 15 | (elem funcref) ;; 0x05 |
| 16 | (elem (table 0) (i32.const 0) funcref) ;; 0x06 |
| 17 | (elem declare funcref) ;; 0x07 |
| 18 | ) |