| Index: impl/memory/datastore_query_execution_test.go
|
| diff --git a/impl/memory/datastore_query_execution_test.go b/impl/memory/datastore_query_execution_test.go
|
| index 2a030b9c2455b075083a39564920f325bb0bb046..c1e64d79a4a5aa3c0b7a258498a62369c27849dc 100644
|
| --- a/impl/memory/datastore_query_execution_test.go
|
| +++ b/impl/memory/datastore_query_execution_test.go
|
| @@ -85,6 +85,15 @@ var stage2Data = []ds.PropertyMap{
|
| ),
|
| }
|
|
|
| +var timeData = []ds.PropertyMap{
|
| + pmap("$key", key("Kind", 1), Next,
|
| + "Date", time.Date(2000, time.January, 1, 1, 1, 1, 1, time.UTC), Next,
|
| + ),
|
| + pmap("$key", key("Kind", 2), Next,
|
| + "Date", time.Date(2000, time.March, 1, 1, 1, 1, 1, time.UTC), Next,
|
| + ),
|
| +}
|
| +
|
| var queryExecutionTests = []qExTest{
|
| {"basic", []qExStage{
|
| {
|
| @@ -385,6 +394,26 @@ var queryExecutionTests = []qExTest{
|
| },
|
| },
|
| }},
|
| + {"time range", []qExStage{
|
| + {
|
| + addIdxs: []*ds.IndexDefinition{
|
| + indx("Kind!", "Date"),
|
| + },
|
| + },
|
| + {
|
| + putEnts: timeData,
|
| + },
|
| + {
|
| + expect: []qExpect{
|
| + {
|
| + q: nq("Kind").Lte("Date", time.Date(2000, time.February, 1, 1, 1, 1, 1, time.UTC)),
|
| + get: []ds.PropertyMap{
|
| + timeData[0],
|
| + },
|
| + },
|
| + },
|
| + },
|
| + }},
|
| }
|
|
|
| func TestQueryExecution(t *testing.T) {
|
| @@ -468,7 +497,7 @@ func TestQueryExecution(t *testing.T) {
|
| So(data.GetAll(expect.q, &rslt), ShouldBeNil)
|
| So(len(rslt), ShouldEqual, len(expect.get))
|
| for i, r := range rslt {
|
| - So(r, ShouldResemble, expect.get[i])
|
| + So(r, ShouldResembleV, expect.get[i])
|
| }
|
| return nil
|
| }, &ds.TransactionOptions{XG: true})
|
|
|