Commit e46dfe8a authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f351942d
......@@ -715,10 +715,31 @@ func testΔBTail(t *testing.T, testq chan ΔBTestEntry) {
// Verify ΔBTail for explicitly provided tree topologies.
func TestΔBTail(t *testing.T) {
// K is shorthand for SetKey
K := func(keyv ...Key) SetKey {
ks := SetKey{}
for _, k := range keyv { ks.Add(k) }
return ks
}
_ = K
// oo is shorthand for kInf
const oo = kInf
// A is shorthand for map[Key]SetKey
type A = map[Key]SetKey
// Δ is shorthand for ΔBTestEntry
Δ := func(tree string, kadjOK A) (test ΔBTestEntry) {
test.tree = tree
test.kadjOK = kadjOK
return test
}
// test known cases going through tree1 -> tree2 -> ...
testv := []interface{} {
"T/B:",
"T/B1:a", // +1
Δ("T/B1:a", A{}), // +1 XXX
//Δ("T/B1:a", A{oo: K(1)}) // +1
"T/B1:a,2:b", // +2
"T/B2:b", // -1
"T/B2:c", // 2: b->c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment