| 1 | import toml |
| 2 | |
| 3 | struct Address { |
| 4 | street string |
| 5 | city string |
| 6 | } |
| 7 | |
| 8 | fn test_inline() { |
| 9 | a := Address{'Elm Street', 'Springwood'} |
| 10 | |
| 11 | mut mp := map[string]toml.Any{} |
| 12 | mp['street'] = toml.Any(a.street) |
| 13 | mp['city'] = toml.Any(a.city) |
| 14 | |
| 15 | assert mp.to_inline_toml() == '{ street = "Elm Street", city = "Springwood" }' |
| 16 | } |
| 17 |