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

Function TestCompareSlices

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

Source from the content-addressed store, hash-verified

47}
48
49func TestCompareSlices(t *testing.T) {
50 testCompare(t, []compareTest{
51 {
52 []interface{}{},
53 []interface{}{},
54 "(=)[]",
55 Unchanged,
56 },
57 {
58 []interface{}{1, 2, 3},
59 []interface{}{1, 2, 3},
60 "(=)[(=)1 (=)2 (=)3]",
61 Unchanged,
62 },
63 {
64 []interface{}{1, 2, 3},
65 []interface{}{1, 2, 4},
66 "(|)[(=)1 (=)2 (>)4]",
67 Involved,
68 },
69 {
70 []interface{}{1, 2, 3},
71 []interface{}{1, 2, 3, 4},
72 "(|)[(=)1 (=)2 (=)3 (+)4]",
73 Involved,
74 },
75 {
76 []interface{}{1, 2, 3},
77 []interface{}{1, 2},
78 "(|)[(=)1 (=)2 (-)3]",
79 Involved,
80 },
81 })
82}
83
84func TestCompareMaps(t *testing.T) {
85 testCompare(t, []compareTest{

Callers

nothing calls this directly

Calls 1

testCompareFunction · 0.85

Tested by

no test coverage detected