File: remove_test.go

package info (click to toggle)
golang-github-clbanning-mxj 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,200 kB
  • sloc: xml: 176; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 325 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package mxj

import (
	"testing"
)

func TestRemove(t *testing.T) {
	m := map[string]interface{}{
		"Div": map[string]interface{}{
			"Colour": "blue",
		},
	}
	mv := Map(m)
	err := mv.Remove("Div.Colour")
	if err != nil {
		t.Fatal(err)
	}
	if v, _ := mv.Exists("Div.Colour"); v {
		t.Fatal("removed key still remain")
	}
}