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

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

Issue 1378613003: Fix bugs in service/datastore (Closed) Base URL: https://github.com/luci/gae.git@add_has_ancestor
Patch Set: fixit 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 | « no previous file | service/datastore/finalized_query.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 "fmt" 8 "fmt"
9 "strings" 9 "strings"
10 "testing" 10 "testing"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 }, 131 },
132 expect: []qExpect{ 132 expect: []qExpect{
133 {q: nq("Kind"), get: stage1Data[:4]}, 133 {q: nq("Kind"), get: stage1Data[:4]},
134 134
135 {q: nq("Kind").Offset(2).Limit(1), get: []ds.Pro pertyMap{ 135 {q: nq("Kind").Offset(2).Limit(1), get: []ds.Pro pertyMap{
136 stage1Data[2], 136 stage1Data[2],
137 }}, 137 }},
138 138
139 {q: nq("Missing"), get: []ds.PropertyMap{}}, 139 {q: nq("Missing"), get: []ds.PropertyMap{}},
140 140
141 {q: nq("Missing").Lt("Id", 2).Gt("Id", 2), get: []ds.PropertyMap{}},
142
143 {q: nq("Missing").Eq("Bogus", 3), get: []ds.Prop ertyMap{}}, 141 {q: nq("Missing").Eq("Bogus", 3), get: []ds.Prop ertyMap{}},
144 142
145 {q: nq("Kind").Eq("Extra", "waffle"), get: []ds. PropertyMap{ 143 {q: nq("Kind").Eq("Extra", "waffle"), get: []ds. PropertyMap{
146 stage1Data[2], stage1Data[3], 144 stage1Data[2], stage1Data[3],
147 }}, 145 }},
148 146
149 // get ziggy with it 147 // get ziggy with it
150 {q: nq("Kind").Eq("Extra", "waffle").Eq("Val", 1 00), get: []ds.PropertyMap{ 148 {q: nq("Kind").Eq("Extra", "waffle").Eq("Val", 1 00), get: []ds.PropertyMap{
151 stage1Data[2], 149 stage1Data[2],
152 }}, 150 }},
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 count, err := data.Count(q) 463 count, err := data.Count(q)
466 So(err, ShouldErrLike, "Insufficient indexes") 464 So(err, ShouldErrLike, "Insufficient indexes")
467 465
468 testing.AutoIndex(true) 466 testing.AutoIndex(true)
469 467
470 count, err = data.Count(q) 468 count, err = data.Count(q)
471 So(err, ShouldBeNil) 469 So(err, ShouldBeNil)
472 So(count, ShouldEqual, 2) 470 So(count, ShouldEqual, 2)
473 }) 471 })
474 } 472 }
OLDNEW
« no previous file with comments | « no previous file | service/datastore/finalized_query.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698