MCPcopy Create free account
hub / github.com/aws-cloudformation/rain / TestCompareMaps

Function TestCompareMaps

cft/diff/diff_test.go:84–117  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

82}
83
84func TestCompareMaps(t *testing.T) {
85 testCompare(t, []compareTest{
86 {
87 map[string]interface{}{},
88 map[string]interface{}{},
89 "(=)map[]",
90 Unchanged,
91 },
92 {
93 map[string]interface{}{"foo": "bar"},
94 map[string]interface{}{"foo": "bar"},
95 "(=)map[foo:(=)bar]",
96 Unchanged,
97 },
98 {
99 map[string]interface{}{"foo": "bar"},
100 map[string]interface{}{"foo": "baz"},
101 "(|)map[foo:(>)baz]",
102 Involved,
103 },
104 {
105 map[string]interface{}{"foo": "bar"},
106 map[string]interface{}{"foo": "bar", "baz": "quux"},
107 "(|)map[baz:(+)quux foo:(=)bar]",
108 Involved,
109 },
110 {
111 map[string]interface{}{"foo": "bar"},
112 map[string]interface{}{},
113 "(|)map[foo:(-)bar]",
114 Involved,
115 },
116 })
117}
118
119func TestCompare(t *testing.T) {
120 original := map[string]interface{}{

Callers

nothing calls this directly

Calls 1

testCompareFunction · 0.85

Tested by

no test coverage detected