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

Unified Diff: impl/memory/testing_utils_test.go

Issue 1243323002: Refactor a bit. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix golint Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « impl/memory/taskqueue_test.go ('k') | impl/prod/context.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/testing_utils_test.go
diff --git a/memory/testing_utils_test.go b/impl/memory/testing_utils_test.go
similarity index 80%
rename from memory/testing_utils_test.go
rename to impl/memory/testing_utils_test.go
index 24796a223956facc948a1c999625ac061ec036ee..b63425866ae2e30a9ead8c8123a6ee65e6c5ca69 100644
--- a/memory/testing_utils_test.go
+++ b/impl/memory/testing_utils_test.go
@@ -9,8 +9,7 @@ import (
"fmt"
"time"
- "github.com/luci/gae"
- "github.com/luci/gae/helper"
+ rds "github.com/luci/gae/service/rawdatastore"
"github.com/luci/luci-go/common/cmpbin"
)
@@ -35,20 +34,20 @@ func indx(kind string, orders ...string) *qIndex {
}
var (
- prop = gae.MkDSProperty
- propNI = gae.MkDSPropertyNI
+ prop = rds.MkProperty
+ propNI = rds.MkPropertyNI
)
-func key(kind string, id interface{}, parent ...gae.DSKey) gae.DSKey {
- p := gae.DSKey(nil)
+func key(kind string, id interface{}, parent ...rds.Key) rds.Key {
+ p := rds.Key(nil)
if len(parent) > 0 {
p = parent[0]
}
switch x := id.(type) {
case string:
- return helper.NewDSKey(globalAppID, "ns", kind, x, 0, p)
+ return rds.NewKey(globalAppID, "ns", kind, x, 0, p)
case int:
- return helper.NewDSKey(globalAppID, "ns", kind, "", int64(x), p)
+ return rds.NewKey(globalAppID, "ns", kind, "", int64(x), p)
default:
panic(fmt.Errorf("what the %T: %v", id, id))
}
@@ -72,16 +71,16 @@ func cat(bytethings ...interface{}) []byte {
cmpbin.WriteFloat64(buf, x)
case byte:
buf.WriteByte(x)
- case gae.DSPropertyType:
+ case rds.PropertyType:
buf.WriteByte(byte(x))
case string:
cmpbin.WriteString(buf, x)
case []byte:
buf.Write(x)
case time.Time:
- helper.WriteTime(buf, x)
- case gae.DSKey:
- helper.WriteDSKey(buf, helper.WithoutContext, x)
+ rds.WriteTime(buf, x)
+ case rds.Key:
+ rds.WriteKey(buf, rds.WithoutContext, x)
case *qIndex:
x.WriteBinary(buf)
default:
« no previous file with comments | « impl/memory/taskqueue_test.go ('k') | impl/prod/context.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698