-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecode_test.go
76 lines (73 loc) · 1.46 KB
/
decode_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package golsv
// import (
// "reflect"
// "testing"
// )
// xxx deprecated
// func TestEnumeratePowerSet(t *testing.T) {
// tests := []struct {
// keys []int
// want [][]int
// }{
// {
// keys: []int{},
// want: [][]int{{}},
// },
// {
// keys: []int{1},
// want: [][]int{{}, {1}},
// },
// {
// keys: []int{1, 2},
// want: [][]int{{}, {2}, {1}, {1, 2}},
// },
// }
// for n, tt := range tests {
// var got [][]int
// enumeratePowerSet(tt.keys, func(keys []int) bool {
// got = append(got, keys)
// return true
// })
// if !reflect.DeepEqual(got, tt.want) {
// t.Errorf("%d: got %v, want %v", n, got, tt.want)
// }
// }
// }
// xxx deprecated
// func TestCoboundaryOfEdges(t *testing.T) {
// tests := []struct {
// incidenceMap map[int][]int
// edges []int
// want map[int]any
// }{
// {
// incidenceMap: map[int][]int{
// 1: {1, 2},
// 2: {2, 3},
// 3: {3, 4},
// },
// edges: []int{1},
// want: map[int]any{
// 1: struct{}{},
// 2: struct{}{},
// },
// },
// {
// incidenceMap: map[int][]int{
// 1: {1, 2},
// 2: {2, 3},
// 3: {3, 4},
// },
// edges: []int{1, 2},
// want: map[int]any{
// 1: struct{}{},
// 3: struct{}{},
// },
// },
// }
// for n, tt := range tests {
// if got := coboundaryOfEdges(tt.incidenceMap, tt.edges); !reflect.DeepEqual(got, tt.want) {
// t.Errorf("%d: got %v, want %v", n, got, tt.want)
// }
// }
// }