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

Unified Diff: service/datastore/index_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/index.go ('k') | service/datastore/interface.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/index_test.go
diff --git a/service/datastore/index_test.go b/service/datastore/index_test.go
index 6d910e649321cc2c079ac7dc6884359287aa7788..6eb523e91213fc597b206e047e788babad185e08 100644
--- a/service/datastore/index_test.go
+++ b/service/datastore/index_test.go
@@ -24,19 +24,19 @@ func TestIndexDefinition(t *testing.T) {
So(id.String(), ShouldEqual, "B:kind")
id.SortBy = append(id.SortBy, IndexColumn{Property: "prop"})
- So(id.SortBy[0].Direction, ShouldEqual, ASCENDING)
+ So(id.SortBy[0].Descending, ShouldBeFalse)
So(id.Builtin(), ShouldBeTrue)
So(id.Compound(), ShouldBeFalse)
So(id.String(), ShouldEqual, "B:kind/prop")
- id.SortBy = append(id.SortBy, IndexColumn{"other", DESCENDING})
+ id.SortBy = append(id.SortBy, IndexColumn{Property: "other", Descending: true})
id.Ancestor = true
So(id.Builtin(), ShouldBeFalse)
So(id.Compound(), ShouldBeTrue)
So(id.String(), ShouldEqual, "C:kind|A/prop/-other")
// invalid
- id.SortBy = append(id.SortBy, IndexColumn{"", DESCENDING})
+ id.SortBy = append(id.SortBy, IndexColumn{Property: "", Descending: true})
So(id.Builtin(), ShouldBeFalse)
So(id.Compound(), ShouldBeFalse)
})
« no previous file with comments | « service/datastore/index.go ('k') | service/datastore/interface.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698