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

Side by Side Diff: service/datastore/serialize/serialize_test.go

Issue 1576153003: Encode nil datastore keys as PTNull. (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Created 4 years, 11 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 | « service/datastore/properties_test.go ('k') | no next file » | 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 serialize 5 package serialize
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "fmt" 9 "fmt"
10 "io" 10 "io"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 { 57 {
58 "basic", 58 "basic",
59 ds.PropertyMap{ 59 ds.PropertyMap{
60 "R": {mp(false), mp(2.1), mpNI(3)}, 60 "R": {mp(false), mp(2.1), mpNI(3)},
61 "S": {mp("hello"), mp("world")}, 61 "S": {mp("hello"), mp("world")},
62 }, 62 },
63 }, 63 },
64 { 64 {
65 "keys", 65 "keys",
66 ds.PropertyMap{ 66 ds.PropertyMap{
67 » » » » "DS": {mp(mkKey("appy", "ns", "Foo", 7)), mp(mkKey("other", "", "Yot", "wheeep"))}, 67 » » » » "DS": {
68 » » » » » mp(mkKey("appy", "ns", "Foo", 7)),
69 » » » » » mp(mkKey("other", "", "Yot", "wheeep")),
70 » » » » » mp((*ds.Key)(nil)),
71 » » » » },
68 "blobstore": {mp(blobstore.Key("sup")), mp(blobs tore.Key("nerds"))}, 72 "blobstore": {mp(blobstore.Key("sup")), mp(blobs tore.Key("nerds"))},
69 }, 73 },
70 }, 74 },
71 { 75 {
72 "geo", 76 "geo",
73 ds.PropertyMap{ 77 ds.PropertyMap{
74 "G": {mp(ds.GeoPoint{Lat: 1, Lng: 2})}, 78 "G": {mp(ds.GeoPoint{Lat: 1, Lng: 2})},
75 }, 79 },
76 }, 80 },
77 { 81 {
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 "__ancestor__": { 506 "__ancestor__": {
503 ToBytes(mp(fakeKey)), 507 ToBytes(mp(fakeKey)),
504 ToBytes(mp(fakeKey.Paren t())), 508 ToBytes(mp(fakeKey.Paren t())),
505 }, 509 },
506 }) 510 })
507 }) 511 })
508 }) 512 })
509 }) 513 })
510 }) 514 })
511 } 515 }
OLDNEW
« no previous file with comments | « service/datastore/properties_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698