(t *testing.T)
| 1217 | } |
| 1218 | |
| 1219 | func TestUnsetKeyBranchLeaf(t *testing.T) { |
| 1220 | branch := TreeBranch{ |
| 1221 | TreeItem{ |
| 1222 | Key: "foo", |
| 1223 | Value: TreeBranch{ |
| 1224 | TreeItem{ |
| 1225 | Key: "bar", |
| 1226 | Value: "bar", |
| 1227 | }, |
| 1228 | TreeItem{ |
| 1229 | Key: "barbar", |
| 1230 | Value: "barbar", |
| 1231 | }, |
| 1232 | }, |
| 1233 | }, |
| 1234 | } |
| 1235 | unset, err := branch.Unset([]interface{}{"foo", "barbar"}) |
| 1236 | assert.NoError(t, err) |
| 1237 | assert.Equal(t, TreeBranch{ |
| 1238 | TreeItem{ |
| 1239 | Key: "foo", |
| 1240 | Value: TreeBranch{ |
| 1241 | TreeItem{ |
| 1242 | Key: "bar", |
| 1243 | Value: "bar", |
| 1244 | }, |
| 1245 | }, |
| 1246 | }, |
| 1247 | }, unset) |
| 1248 | } |
| 1249 | |
| 1250 | func TestUnsetKeyBranch(t *testing.T) { |
| 1251 | branch := TreeBranch{ |