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

Side by Side Diff: impl/dummy/dummy.go

Issue 1871943003: Add Info Testable interface, implement for memory. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Created 4 years, 8 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 dummy 5 package dummy
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "runtime" 9 "runtime"
10 "strings" 10 "strings"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 func (i) VersionID() string { panic(ni()) } 155 func (i) VersionID() string { panic(ni()) }
156 func (i) Namespace(namespace string) (context.Context, error) { panic(ni()) } 156 func (i) Namespace(namespace string) (context.Context, error) { panic(ni()) }
157 func (i) MustNamespace(namespace string) context.Context { panic(ni()) } 157 func (i) MustNamespace(namespace string) context.Context { panic(ni()) }
158 func (i) Datacenter() string { panic(ni()) } 158 func (i) Datacenter() string { panic(ni()) }
159 func (i) InstanceID() string { panic(ni()) } 159 func (i) InstanceID() string { panic(ni()) }
160 func (i) IsDevAppServer() bool { panic(ni()) } 160 func (i) IsDevAppServer() bool { panic(ni()) }
161 func (i) ServerSoftware() string { panic(ni()) } 161 func (i) ServerSoftware() string { panic(ni()) }
162 func (i) IsCapabilityDisabled(err error) bool { panic(ni()) } 162 func (i) IsCapabilityDisabled(err error) bool { panic(ni()) }
163 func (i) IsOverQuota(err error) bool { panic(ni()) } 163 func (i) IsOverQuota(err error) bool { panic(ni()) }
164 func (i) IsTimeoutError(err error) bool { panic(ni()) } 164 func (i) IsTimeoutError(err error) bool { panic(ni()) }
165 func (i) Testable() info.Testable { panic(ni()) }
165 166
166 var dummyInfoInst = i{} 167 var dummyInfoInst = i{}
167 168
168 // Info returns a dummy info.Interface implementation suitable for embedding. 169 // Info returns a dummy info.Interface implementation suitable for embedding.
169 // Every method panics with a message containing the name of the method which 170 // Every method panics with a message containing the name of the method which
170 // was unimplemented. 171 // was unimplemented.
171 func Info() info.Interface { return dummyInfoInst } 172 func Info() info.Interface { return dummyInfoInst }
172 173
173 ////////////////////////////////////// u /////////////////////////////////////// 174 ////////////////////////////////////// u ///////////////////////////////////////
174 175
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 func (mod) DefaultVersion(module string) (string, error) { panic( ni()) } 217 func (mod) DefaultVersion(module string) (string, error) { panic( ni()) }
217 func (mod) Start(module, version string) error { panic( ni()) } 218 func (mod) Start(module, version string) error { panic( ni()) }
218 func (mod) Stop(module, version string) error { panic( ni()) } 219 func (mod) Stop(module, version string) error { panic( ni()) }
219 220
220 var dummyModuleInst = mod{} 221 var dummyModuleInst = mod{}
221 222
222 // Module returns a dummy module.Interface implementation suitable for 223 // Module returns a dummy module.Interface implementation suitable for
223 // embedding. Every method panics with a message containing the name of the 224 // embedding. Every method panics with a message containing the name of the
224 // method which was unimplemented. 225 // method which was unimplemented.
225 func Module() module.Interface { return dummyModuleInst } 226 func Module() module.Interface { return dummyModuleInst }
OLDNEW
« filter/count/gi.go ('K') | « filter/count/gi.go ('k') | impl/memory/context.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698