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

Side by Side Diff: go/src/infra/gae/libs/wrapper/memory/key_test.go

Issue 1160253002: Add initial Query generation, correctness checking and index generation. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: address comments and stuff Created 5 years, 6 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 unified diff | Download patch
OLDNEW
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 "bytes" 8 "bytes"
9 "fmt" 9 "fmt"
10 "infra/gae/libs/wrapper" 10 "infra/gae/libs/wrapper"
(...skipping 24 matching lines...) Expand all
35 c, err := wrapper.GetGI(c).Namespace("bobspace") 35 c, err := wrapper.GetGI(c).Namespace("bobspace")
36 So(err, ShouldBeNil) 36 So(err, ShouldBeNil)
37 ds := wrapper.GetDS(c) 37 ds := wrapper.GetDS(c)
38 38
39 k := ds.NewKey("Bunny", "", 10, ds.NewKey("Parent", "Cat", 0, ni l)) 39 k := ds.NewKey("Bunny", "", 10, ds.NewKey("Parent", "Cat", 0, ni l))
40 So(k.Namespace(), ShouldEqual, "bobspace") 40 So(k.Namespace(), ShouldEqual, "bobspace")
41 41
42 b := &bytes.Buffer{} 42 b := &bytes.Buffer{}
43 writeKey(b, withNS, k) 43 writeKey(b, withNS, k)
44 44
45 » » newk, err := readKey(b, withNS) 45 » » newk, err := readKey(b, withNS, "")
46 So(err, ShouldBeNil) 46 So(err, ShouldBeNil)
47 So(k.Namespace(), ShouldEqual, "bobspace") 47 So(k.Namespace(), ShouldEqual, "bobspace")
48 So(newk, shouldEqualKey, k) 48 So(newk, shouldEqualKey, k)
49 So(b.Bytes(), ShouldBeEmpty) 49 So(b.Bytes(), ShouldBeEmpty)
50 }) 50 })
51 } 51 }
OLDNEW
« no previous file with comments | « go/src/infra/gae/libs/wrapper/memory/key.go ('k') | go/src/infra/gae/libs/wrapper/memory/memory.infra_testing » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698