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

Side by Side Diff: impl/memory/testing_utils_test.go

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Lightning talk licenses. Created 4 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 unified diff | Download patch
« no previous file with comments | « impl/memory/taskqueue_test.go ('k') | impl/memory/transaction.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be 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 "strings" 10 "strings"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 return ret 110 return ret
111 } 111 }
112 112
113 var ( 113 var (
114 prop = ds.MkProperty 114 prop = ds.MkProperty
115 propNI = ds.MkPropertyNI 115 propNI = ds.MkPropertyNI
116 ) 116 )
117 117
118 func key(elems ...interface{}) *ds.Key { 118 func key(elems ...interface{}) *ds.Key {
119 » return ds.MakeKey("dev~app", "ns", elems...) 119 » return ds.KeyContext{"dev~app", "ns"}.MakeKey(elems...)
120 } 120 }
121 121
122 func die(err error) { 122 func die(err error) {
123 if err != nil { 123 if err != nil {
124 panic(err) 124 panic(err)
125 } 125 }
126 } 126 }
127 127
128 // cat is a convenience method for concatenating anything with an underlying 128 // cat is a convenience method for concatenating anything with an underlying
129 // byte representation into a single []byte. 129 // byte representation into a single []byte.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 ret := cat(bytethings...) 174 ret := cat(bytethings...)
175 for i := range ret { 175 for i := range ret {
176 ret[i] ^= 0xFF 176 ret[i] ^= 0xFF
177 } 177 }
178 return ret 178 return ret
179 } 179 }
180 180
181 func sat(bytethings ...interface{}) string { 181 func sat(bytethings ...interface{}) string {
182 return string(cat(bytethings...)) 182 return string(cat(bytethings...))
183 } 183 }
OLDNEW
« no previous file with comments | « impl/memory/taskqueue_test.go ('k') | impl/memory/transaction.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698