| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package txnBuf | 5 package txnBuf |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "bytes" | 8 "bytes" |
| 9 "fmt" | 9 "fmt" |
| 10 "math/rand" | 10 "math/rand" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 return ShouldBeNil(ds.Put(c, f)) | 88 return ShouldBeNil(ds.Put(c, f)) |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 | 91 |
| 92 var ( | 92 var ( |
| 93 dataMultiRoot = make([]*Foo, 20) | 93 dataMultiRoot = make([]*Foo, 20) |
| 94 dataSingleRoot = make([]*Foo, 20) | 94 dataSingleRoot = make([]*Foo, 20) |
| 95 hugeField = make([]byte, DefaultSizeBudget/8) | 95 hugeField = make([]byte, DefaultSizeBudget/8) |
| 96 hugeData = make([]*Foo, 11) | 96 hugeData = make([]*Foo, 11) |
| 97 » root = ds.KeyContext{"something~else", ""}.MakeKey("Parent", 1
) | 97 » root = ds.MkKeyContext("something~else", "").MakeKey("Parent",
1) |
| 98 ) | 98 ) |
| 99 | 99 |
| 100 func init() { | 100 func init() { |
| 101 cb := func(i int64) string { | 101 cb := func(i int64) string { |
| 102 buf := &bytes.Buffer{} | 102 buf := &bytes.Buffer{} |
| 103 cmpbin.WriteInt(buf, i) | 103 cmpbin.WriteInt(buf, i) |
| 104 return buf.String() | 104 return buf.String() |
| 105 } | 105 } |
| 106 | 106 |
| 107 rs := rand.NewSource(0) | 107 rs := rand.NewSource(0) |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 val := pm.Slice("Value") | 855 val := pm.Slice("Value") |
| 856 So(val[len(val)-1].Value(), ShouldResemb
le, "wat") | 856 So(val[len(val)-1].Value(), ShouldResemb
le, "wat") |
| 857 }), ShouldBeNil) | 857 }), ShouldBeNil) |
| 858 }) | 858 }) |
| 859 | 859 |
| 860 }) | 860 }) |
| 861 | 861 |
| 862 }) | 862 }) |
| 863 | 863 |
| 864 } | 864 } |
| OLD | NEW |