Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: impl/memory/gkvlite_utils_test.go

Issue 1302813003: impl/memory: Implement Queries (Closed) Base URL: https://github.com/luci/gae.git@add_multi_iterator
Patch Set: stringSet everywhere Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « impl/memory/gkvlite_utils.go ('k') | impl/memory/stringset.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package memory 5 package memory
6 6
7 import ( 7 import (
8 "testing" 8 "testing"
9 9
10 . "github.com/smartystreets/goconvey/convey" 10 . "github.com/smartystreets/goconvey/convey"
11 ) 11 )
12 12
13 type keyLeftRight struct{ key, left, right []byte } 13 type keyLeftRight struct{ key, left, right []byte }
14 14
15 type kv struct{ k, v []byte }
16
15 var testCollisionCases = []struct { 17 var testCollisionCases = []struct {
16 name string 18 name string
17 left, right []kv // inserts into left and right collections 19 left, right []kv // inserts into left and right collections
18 expect []keyLeftRight 20 expect []keyLeftRight
19 }{ 21 }{
20 { 22 {
21 name: "nil", 23 name: "nil",
22 }, 24 },
23 { 25 {
24 name: "empty", 26 name: "empty",
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 So(key, ShouldResemble, e.key) 121 So(key, ShouldResemble, e.key)
120 So(left, ShouldResemble, e.left) 122 So(left, ShouldResemble, e.left)
121 So(right, ShouldResemble, e.right) 123 So(right, ShouldResemble, e.right)
122 i++ 124 i++
123 }) 125 })
124 So(i, ShouldEqual, len(tc.expect)) 126 So(i, ShouldEqual, len(tc.expect))
125 }) 127 })
126 } 128 }
127 }) 129 })
128 } 130 }
OLDNEW
« no previous file with comments | « impl/memory/gkvlite_utils.go ('k') | impl/memory/stringset.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698