| 1 | @[heap] |
| 2 | struct Attribute { |
| 3 | mut: |
| 4 | name string |
| 5 | value string |
| 6 | } |
| 7 | |
| 8 | type AttributeStack = []&Attribute |
| 9 | |
| 10 | fn test_array_of_alias_pop() { |
| 11 | mut stack := AttributeStack([]&Attribute{}) |
| 12 | stack << &Attribute{'foo', 'bar'} |
| 13 | ret := stack.pop() |
| 14 | println(ret) |
| 15 | assert ret.name == 'foo' |
| 16 | assert ret.value == 'bar' |
| 17 | } |
| 18 |