You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

60 lines
1.1 KiB

package final_common
import (
"testing"
)
var f = map[string]map[string]string{"1": map[string]string{"11": "AA", "22": "BB"}, "2": map[string]string{"22": "BB", "33": "CC"}}
var l = map[string]map[string]string{"2": map[string]string{"22": "BB", "33": "CC"}, "3": map[string]string{"33": "CC", "44": "DD"}}
// 并集(保留项) -- 遍历S2
func TestUnionF(t *testing.T) {
}
// 并集(覆盖项) -- 遍历S2
func TestUnionL(t *testing.T) {
}
// 差集 -- 遍历S2
func TestMinus(t *testing.T) {
}
// 交集 -- 遍历S1
func TestIntersect(t *testing.T) {
}
// 补集 -- 遍历S2
func TestComplement(t *testing.T) {
}
//========================== 指定map(map) ==========================
// 并集(保留项) -- 遍历S2
func TestUnionFMap(t *testing.T) {
PrintMap(UnionFMap(f, l))
}
// 并集(覆盖项) -- 遍历S2
func TestUnionLMap(t *testing.T) {
PrintMap(UnionLMap(f, l))
}
// 差集 -- 遍历S2
func TestMinusMap(t *testing.T) {
PrintMap(MinusMap(f, l))
}
// 交集 -- 遍历S1
func TestIntersectMap(t *testing.T) {
PrintMap(IntersectMap(f, l))
}
// 补集 -- 遍历S2
func TestComplementMap(t *testing.T) {
PrintMap(ComplementMap(f, l))
}