| 1 | // vtest build: !sanitize-memory-gcc && !sanitize-address-gcc && !sanitize-address-clang |
| 2 | // vtest vflags: -autofree |
| 3 | import x.json2 |
| 4 | |
| 5 | struct Config { |
| 6 | bbb bool |
| 7 | } |
| 8 | |
| 9 | fn test_compilation_with_autofree() { |
| 10 | cfg := Config{} |
| 11 | s := json2.encode(cfg, prettify: true) |
| 12 | assert s == '{\n "bbb": false\n}' |
| 13 | } |
| 14 |