| OLD | NEW |
| 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 memory | 5 package memory |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "fmt" | 8 "fmt" |
| 9 "infra/gae/libs/meta" | 9 "infra/gae/libs/meta" |
| 10 "infra/gae/libs/wrapper" | 10 "infra/gae/libs/wrapper" |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 }) | 519 }) |
| 520 }) | 520 }) |
| 521 }) | 521 }) |
| 522 }) | 522 }) |
| 523 | 523 |
| 524 }) | 524 }) |
| 525 } | 525 } |
| 526 | 526 |
| 527 const MaxUint = ^uint(0) | 527 const MaxUint = ^uint(0) |
| 528 const MaxInt = int(MaxUint >> 1) | 528 const MaxInt = int(MaxUint >> 1) |
| 529 const IntIs32Bits = MaxInt < math.MaxInt64 | 529 const IntIs32Bits = int64(MaxInt) < math.MaxInt64 |
| 530 | 530 |
| 531 func TestDatastoreQueryer(t *testing.T) { | 531 func TestDatastoreQueryer(t *testing.T) { |
| 532 Convey("Datastore Query suport", t, func() { | 532 Convey("Datastore Query suport", t, func() { |
| 533 c := Use(context.Background()) | 533 c := Use(context.Background()) |
| 534 ds := wrapper.GetDS(c) | 534 ds := wrapper.GetDS(c) |
| 535 So(ds, ShouldNotBeNil) | 535 So(ds, ShouldNotBeNil) |
| 536 | 536 |
| 537 Convey("can create good queries", func() { | 537 Convey("can create good queries", func() { |
| 538 q := ds.NewQuery("Foo").KeysOnly().Limit(10).Offset(39) | 538 q := ds.NewQuery("Foo").KeysOnly().Limit(10).Offset(39) |
| 539 q = q.Start(queryCursor("kosmik")).End(queryCursor("krab
s")) | 539 q = q.Start(queryCursor("kosmik")).End(queryCursor("krab
s")) |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 }) | 673 }) |
| 674 Convey("kindless with decending-__key__ orders", func()
{ | 674 Convey("kindless with decending-__key__ orders", func()
{ |
| 675 q := ds.NewQuery("").Order("-__key__") | 675 q := ds.NewQuery("").Order("-__key__") |
| 676 qi := q.(*queryImpl).checkCorrectness("", false) | 676 qi := q.(*queryImpl).checkCorrectness("", false) |
| 677 So(qi.err.Error(), ShouldContainSubstring, "kind
is required for all orders") | 677 So(qi.err.Error(), ShouldContainSubstring, "kind
is required for all orders") |
| 678 }) | 678 }) |
| 679 }) | 679 }) |
| 680 | 680 |
| 681 }) | 681 }) |
| 682 } | 682 } |
| OLD | NEW |