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

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

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Lightning talk licenses. 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 unified diff | Download patch
« no previous file with comments | « service/datastore/multiarg.go ('k') | service/datastore/query_test.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 LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package datastore 5 package datastore
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "math" 9 "math"
10 "sort" 10 "sort"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 So(pv.IndexSetting(), ShouldEqual, Shoul dIndex) 84 So(pv.IndexSetting(), ShouldEqual, Shoul dIndex)
85 So(pv.Type().String(), ShouldEqual, "PTS tring") 85 So(pv.Type().String(), ShouldEqual, "PTS tring")
86 }) 86 })
87 Convey("blobstore.Key is distinquished", func() { 87 Convey("blobstore.Key is distinquished", func() {
88 pv := MkProperty(blobstore.Key("sup")) 88 pv := MkProperty(blobstore.Key("sup"))
89 So(pv.Value(), ShouldEqual, blobstore.Ke y("sup")) 89 So(pv.Value(), ShouldEqual, blobstore.Ke y("sup"))
90 So(pv.IndexSetting(), ShouldEqual, Shoul dIndex) 90 So(pv.IndexSetting(), ShouldEqual, Shoul dIndex)
91 So(pv.Type().String(), ShouldEqual, "PTB lobKey") 91 So(pv.Type().String(), ShouldEqual, "PTB lobKey")
92 }) 92 })
93 Convey("datastore Key is distinguished", func() { 93 Convey("datastore Key is distinguished", func() {
94 » » » » » k := MakeKey("appid", "ns", "kind", "1") 94 » » » » » k := KeyContext{"appid", "ns"}.MakeKey(" kind", "1")
95 pv := MkProperty(k) 95 pv := MkProperty(k)
96 So(pv.Value(), ShouldHaveSameTypeAs, k) 96 So(pv.Value(), ShouldHaveSameTypeAs, k)
97 So(pv.Value().(*Key).Equal(k), ShouldBeT rue) 97 So(pv.Value().(*Key).Equal(k), ShouldBeT rue)
98 So(pv.IndexSetting(), ShouldEqual, Shoul dIndex) 98 So(pv.IndexSetting(), ShouldEqual, Shoul dIndex)
99 So(pv.Type().String(), ShouldEqual, "PTK ey") 99 So(pv.Type().String(), ShouldEqual, "PTK ey")
100 100
101 pv = MkProperty((*Key)(nil)) 101 pv = MkProperty((*Key)(nil))
102 So(pv.Value(), ShouldBeNil) 102 So(pv.Value(), ShouldBeNil)
103 So(pv.IndexSetting(), ShouldEqual, Shoul dIndex) 103 So(pv.IndexSetting(), ShouldEqual, Shoul dIndex)
104 So(pv.Type().String(), ShouldEqual, "PTN ull") 104 So(pv.Type().String(), ShouldEqual, "PTN ull")
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 cmpBS, _ := c.co nv(tc.cmpS) 309 cmpBS, _ := c.co nv(tc.cmpS)
310 So(cmpByteSequen ce(bs, cmpBS), tc.assertion, 0) 310 So(cmpByteSequen ce(bs, cmpBS), tc.assertion, 0)
311 }) 311 })
312 } 312 }
313 } 313 }
314 }) 314 })
315 } 315 }
316 } 316 }
317 }) 317 })
318 } 318 }
OLDNEW
« no previous file with comments | « service/datastore/multiarg.go ('k') | service/datastore/query_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698