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

Side by Side Diff: service/datastore/checkfilter_test.go

Issue 1279703003: Get rid of awkward proto argument to Interface.Run (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: rename test helper Created 5 years, 4 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/datastore.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 // adapted from github.com/golang/appengine/datastore 5 // adapted from github.com/golang/appengine/datastore
6 6
7 package datastore 7 package datastore
8 8
9 import ( 9 import (
10 "testing" 10 "testing"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 }, nil) 42 }, nil)
43 }, ShouldPanic) 43 }, ShouldPanic)
44 So(hit, ShouldBeFalse) 44 So(hit, ShouldBeFalse)
45 }) 45 })
46 46
47 Convey("Run", func() { 47 Convey("Run", func() {
48 So(rds.Run(nil, nil).Error(), ShouldContainSubstring, "q uery is nil") 48 So(rds.Run(nil, nil).Error(), ShouldContainSubstring, "q uery is nil")
49 So(rds.Run(rds.NewQuery("sup"), nil).Error(), ShouldCont ainSubstring, "callback is nil") 49 So(rds.Run(rds.NewQuery("sup"), nil).Error(), ShouldCont ainSubstring, "callback is nil")
50 hit := false 50 hit := false
51 So(func() { 51 So(func() {
52 » » » » rds.Run(rds.NewQuery("sup"), func(Key, PropertyM ap, func() (Cursor, error)) bool { 52 » » » » rds.Run(rds.NewQuery("sup"), func(Key, PropertyM ap, CursorCB) bool {
53 hit = true 53 hit = true
54 return true 54 return true
55 }) 55 })
56 }, ShouldPanic) 56 }, ShouldPanic)
57 So(hit, ShouldBeFalse) 57 So(hit, ShouldBeFalse)
58 }) 58 })
59 59
60 Convey("GetMulti", func() { 60 Convey("GetMulti", func() {
61 So(rds.GetMulti(nil, nil, nil), ShouldBeNil) 61 So(rds.GetMulti(nil, nil, nil), ShouldBeNil)
62 So(rds.GetMulti([]Key{NewKey("", "", "", "", 0, nil)}, n il, nil).Error(), ShouldContainSubstring, "is nil") 62 So(rds.GetMulti([]Key{NewKey("", "", "", "", 0, nil)}, n il, nil).Error(), ShouldContainSubstring, "is nil")
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 So(func() { 122 So(func() {
123 rds.DeleteMulti([]Key{NewKey("aid", "ns", "Kind" , "", 1, nil)}, func(error) { 123 rds.DeleteMulti([]Key{NewKey("aid", "ns", "Kind" , "", 1, nil)}, func(error) {
124 hit = true 124 hit = true
125 }) 125 })
126 }, ShouldPanic) 126 }, ShouldPanic)
127 So(hit, ShouldBeFalse) 127 So(hit, ShouldBeFalse)
128 }) 128 })
129 129
130 }) 130 })
131 } 131 }
OLDNEW
« no previous file with comments | « no previous file | service/datastore/datastore.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698