Commit c4f1909f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 46c44e54
...@@ -27,6 +27,7 @@ import ( ...@@ -27,6 +27,7 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"os/exec" "os/exec"
"reflect"
"regexp" "regexp"
"sort" "sort"
"strings" "strings"
...@@ -218,6 +219,7 @@ func verifyΔBTail(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1, at2 zodb.T ...@@ -218,6 +219,7 @@ func verifyΔBTail(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1, at2 zodb.T
// tracked state defined by initialTrackedKeys. // tracked state defined by initialTrackedKeys.
func verifyΔBTail1(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.Tid, kv1,kv2 map[Key]string, δZ *zodb.EventCommit, initialTrackedKeys []Key) { func verifyΔBTail1(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.Tid, kv1,kv2 map[Key]string, δZ *zodb.EventCommit, initialTrackedKeys []Key) {
X := exc.Raiseif X := exc.Raiseif
fmt.Println("verify1", initialTrackedKeys)
txn, ctx := transaction.New(context.Background()) txn, ctx := transaction.New(context.Background())
defer txn.Abort() defer txn.Abort()
...@@ -248,6 +250,7 @@ func TestΔBTail(t *testing.T) { ...@@ -248,6 +250,7 @@ func TestΔBTail(t *testing.T) {
testv := []string { testv := []string {
"T/B:", "T/B:",
"T/B1:a", "T/B1:a",
"T/B2:b",
// XXX // XXX
} }
...@@ -346,3 +349,17 @@ func intSets(ch chan []int, lo, hi int) { ...@@ -346,3 +349,17 @@ func intSets(ch chan []int, lo, hi int) {
close(ch) close(ch)
} }
func TestIntSets(t *testing.T) {
got := [][]int{}
for is := range IntSets(3) {
got = append(got, is)
}
I := func(v ...int) []int { return v }
want := [][]int{I(), I(0), I(1), I(2) /* XXX */}
if !reflect.DeepEqual(got, want) {
t.Fatalf("error:\ngot: %v\nwant: %v", got, want)
}
}
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