(t *testing.T)
| 1116 | } |
| 1117 | |
| 1118 | func TestSetArray(t *testing.T) { |
| 1119 | branch := TreeBranch{ |
| 1120 | TreeItem{ |
| 1121 | Key: "foo", |
| 1122 | Value: []interface{}{ |
| 1123 | "one", |
| 1124 | "two", |
| 1125 | "three", |
| 1126 | }, |
| 1127 | }, |
| 1128 | } |
| 1129 | set, changed := branch.Set([]interface{}{"foo", 0}, "uno") |
| 1130 | assert.Equal(t, true, changed) |
| 1131 | assert.Equal(t, "uno", set[0].Value.([]interface{})[0]) |
| 1132 | } |
| 1133 | |
| 1134 | func TestSetArrayNew(t *testing.T) { |
| 1135 | branch := TreeBranch{} |