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

Unified Diff: service/datastore/properties_test.go

Issue 1355783002: Refactor keys and queries in datastore service and implementation. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: appease errcheck Created 5 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.go ('k') | service/datastore/query.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/properties_test.go
diff --git a/service/datastore/properties_test.go b/service/datastore/properties_test.go
index b09776d25cd5838b6ae4e8b5a4c3c2da5c88f700..f814d435f39119ae4d989e5532cfc85ff41aa23b 100644
--- a/service/datastore/properties_test.go
+++ b/service/datastore/properties_test.go
@@ -36,7 +36,7 @@ func TestProperties(t *testing.T) {
So(pv.IndexSetting(), ShouldEqual, NoIndex)
So(pv.Type().String(), ShouldEqual, "PTInt")
- pv.SetValue(nil, ShouldIndex)
+ So(pv.SetValue(nil, ShouldIndex), ShouldBeNil)
So(pv.Value(), ShouldBeNil)
So(pv.IndexSetting(), ShouldEqual, ShouldIndex)
So(pv.Type().String(), ShouldEqual, "PTNull")
@@ -69,7 +69,7 @@ func TestProperties(t *testing.T) {
})
Convey("float", func() {
pv := Property{}
- pv.SetValue(myfloat(19.7), ShouldIndex)
+ So(pv.SetValue(myfloat(19.7), ShouldIndex), ShouldBeNil)
So(pv.Value(), ShouldHaveSameTypeAs, float64(19.7))
So(pv.Value(), ShouldEqual, float32(19.7))
So(pv.IndexSetting(), ShouldEqual, ShouldIndex)
@@ -111,14 +111,14 @@ func TestProperties(t *testing.T) {
pv := Property{}
now := time.Now().In(time.UTC)
now = now.Round(time.Microsecond).Add(time.Nanosecond * 313)
- pv.SetValue(now, ShouldIndex)
+ So(pv.SetValue(now, ShouldIndex), ShouldBeNil)
So(pv.Value(), ShouldHappenBefore, now)
So(pv.IndexSetting(), ShouldEqual, ShouldIndex)
So(pv.Type().String(), ShouldEqual, "PTTime")
})
Convey("[]byte allows IndexSetting", func() {
pv := Property{}
- pv.SetValue([]byte("hello"), ShouldIndex)
+ So(pv.SetValue([]byte("hello"), ShouldIndex), ShouldBeNil)
So(pv.Value(), ShouldResemble, []byte("hello"))
So(pv.IndexSetting(), ShouldEqual, ShouldIndex)
So(pv.Type().String(), ShouldEqual, "PTBytes")
« no previous file with comments | « service/datastore/properties.go ('k') | service/datastore/query.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698