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

Unified Diff: service/datastore/query_test.go

Issue 2353063004: Add "MkKeyContext" KeyContext generation function. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « service/datastore/properties_test.go ('k') | service/datastore/serialize/serialize_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/query_test.go
diff --git a/service/datastore/query_test.go b/service/datastore/query_test.go
index 366ab8b63d901e68c6e0b3fd7e901a97863701db..b903a9b0c27d830752d8fd7692688954e06a98b1 100644
--- a/service/datastore/query_test.go
+++ b/service/datastore/query_test.go
@@ -82,7 +82,7 @@ func nq(kinds ...string) *Query {
}
func mkKey(elems ...interface{}) *Key {
- return KeyContext{"s~aid", "ns"}.MakeKey(elems...)
+ return MkKeyContext("s~aid", "ns").MakeKey(elems...)
}
var queryTests = []queryTest{
@@ -321,7 +321,7 @@ func TestQueries(t *testing.T) {
Convey(tc.name, func() {
fq, err := tc.q.Finalize()
if err == nil {
- err = fq.Valid(KeyContext{"s~aid", "ns"})
+ err = fq.Valid(MkKeyContext("s~aid", "ns"))
}
So(err, ShouldErrLike, tc.err)
« no previous file with comments | « service/datastore/properties_test.go ('k') | service/datastore/serialize/serialize_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698