| 1 | module main |
| 2 | |
| 3 | struct File { |
| 4 | root string |
| 5 | path string |
| 6 | } |
| 7 | |
| 8 | struct Test { |
| 9 | mut: |
| 10 | mod_files map[string][5]File |
| 11 | } |
| 12 | |
| 13 | fn test_main() { |
| 14 | mut test := Test{} |
| 15 | for i in 0 .. 4 { |
| 16 | test.mod_files['main'][i] = File{} |
| 17 | } |
| 18 | test.mod_files['main'][3] = File{ |
| 19 | root: 'foo' |
| 20 | path: 'bar' |
| 21 | } |
| 22 | assert test.mod_files['main'][3] == File{ |
| 23 | root: 'foo' |
| 24 | path: 'bar' |
| 25 | } |
| 26 | } |
| 27 |