(t *testing.T)
| 1248 | } |
| 1249 | |
| 1250 | func TestUnsetKeyBranch(t *testing.T) { |
| 1251 | branch := TreeBranch{ |
| 1252 | TreeItem{ |
| 1253 | Key: "foo", |
| 1254 | Value: "foo", |
| 1255 | }, |
| 1256 | TreeItem{ |
| 1257 | Key: "foofoo", |
| 1258 | Value: TreeBranch{ |
| 1259 | TreeItem{ |
| 1260 | Key: "bar", |
| 1261 | Value: "bar", |
| 1262 | }, |
| 1263 | }, |
| 1264 | }, |
| 1265 | } |
| 1266 | unset, err := branch.Unset([]interface{}{"foofoo"}) |
| 1267 | assert.NoError(t, err) |
| 1268 | assert.Equal(t, TreeBranch{ |
| 1269 | TreeItem{ |
| 1270 | Key: "foo", |
| 1271 | Value: "foo", |
| 1272 | }, |
| 1273 | }, unset) |
| 1274 | } |
| 1275 | |
| 1276 | func TestUnsetKeyRootLastLeaf(t *testing.T) { |
| 1277 | branch := TreeBranch{ |