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

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

Issue 1365743002: Refactor serialization helpers from impl/memory -> service/datastore/serialize (Closed) Base URL: https://github.com/luci/gae.git@estimate_size
Patch Set: fix comments Created 5 years, 2 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/datastore_query_execution.go ('k') | impl/memory/gkvlite_iter.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 "bytes" 8 "bytes"
9 "testing" 9 "testing"
10 10
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 post.SetInvert(col.Descending) 40 post.SetInvert(col.Descending)
41 if err := serialize.WriteIndexColumn(pre, col); err != nil { 41 if err := serialize.WriteIndexColumn(pre, col); err != nil {
42 panic(err) 42 panic(err)
43 } 43 }
44 if err := serialize.WriteProperty(post, serialize.WithoutContext , prop(v)); err != nil { 44 if err := serialize.WriteProperty(post, serialize.WithoutContext , prop(v)); err != nil {
45 panic(err) 45 panic(err)
46 } 46 }
47 } 47 }
48 » return queryCursor(bjoin(pre.Bytes(), post.Bytes())) 48 » return queryCursor(serialize.Join(pre.Bytes(), post.Bytes()))
49 } 49 }
50 50
51 type queryTest struct { 51 type queryTest struct {
52 // name is the name of the test case 52 // name is the name of the test case
53 name string 53 name string
54 54
55 // q is the input query 55 // q is the input query
56 q *dstore.Query 56 q *dstore.Query
57 57
58 // err is the error to expect after prepping the query (error, string or nil) 58 // err is the error to expect after prepping the query (error, string or nil)
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 So(err, ShouldErrLike, tc.err) 169 So(err, ShouldErrLike, tc.err)
170 170
171 if tc.equivalentQuery != nil { 171 if tc.equivalentQuery != nil {
172 So(rq, ShouldResemble, tc.equiva lentQuery) 172 So(rq, ShouldResemble, tc.equiva lentQuery)
173 } 173 }
174 }) 174 })
175 } 175 }
176 }) 176 })
177 }) 177 })
178 } 178 }
OLDNEW
« no previous file with comments | « impl/memory/datastore_query_execution.go ('k') | impl/memory/gkvlite_iter.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698