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 "testing" | 8 "testing" |
9 "time" | 9 "time" |
10 | 10 |
11 ds "github.com/luci/gae/service/datastore" | 11 ds "github.com/luci/gae/service/datastore" |
| 12 "github.com/luci/gae/service/datastore/serialize" |
12 "github.com/luci/gkvlite" | 13 "github.com/luci/gkvlite" |
13 . "github.com/smartystreets/goconvey/convey" | 14 . "github.com/smartystreets/goconvey/convey" |
14 ) | 15 ) |
15 | 16 |
16 func init() { | 17 func init() { |
17 » indexCreationDeterministic = true | 18 » serializationDeterministic = true |
| 19 » serialize.WritePropertyMapDeterministic = true |
18 } | 20 } |
19 | 21 |
20 var fakeKey = key("knd", 10, key("parentKind", "sid")) | 22 var fakeKey = key("knd", 10, key("parentKind", "sid")) |
21 | 23 |
22 func TestCollated(t *testing.T) { | 24 func TestCollated(t *testing.T) { |
23 t.Parallel() | 25 t.Parallel() |
24 | 26 |
25 Convey("TestCollated", t, func() { | 27 Convey("TestCollated", t, func() { |
26 Convey("nil list", func() { | 28 Convey("nil list", func() { |
27 pm := (ds.PropertyMap)(nil) | 29 pm := (ds.PropertyMap)(nil) |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 So(data[i], ShouldResemble, itm.
Key) | 383 So(data[i], ShouldResemble, itm.
Key) |
382 i++ | 384 i++ |
383 return true | 385 return true |
384 }) | 386 }) |
385 So(i, ShouldEqual, len(data)) | 387 So(i, ShouldEqual, len(data)) |
386 } | 388 } |
387 }) | 389 }) |
388 } | 390 } |
389 }) | 391 }) |
390 } | 392 } |
OLD | NEW |