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

Unified Diff: service/datastore/size_test.go

Issue 2342063003: Differentiate between single- and multi- props. (Closed)
Patch Set: Slice is now always a clone. This is marginally worse performance, but a much safer UI. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « service/datastore/serialize/serialize_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/size_test.go
diff --git a/service/datastore/size_test.go b/service/datastore/size_test.go
index e07cbac73fe2c5aabe6ad323c42958726c66cf20..817f2b1ef9808928f7cf03f10f4a03c24c00b900 100644
--- a/service/datastore/size_test.go
+++ b/service/datastore/size_test.go
@@ -27,7 +27,7 @@ var estimateSizeTests = []struct {
pm PropertyMap
expect int
}{
- {PropertyMap{"Something": {}}, 9},
+ {PropertyMap{"Something": mps()}, 9},
{PropertyMap{"Something": mps(100)}, 18},
{PropertyMap{"Something": mps(100.1, "sup")}, 22},
{PropertyMap{
@@ -56,7 +56,7 @@ func stablePmString(pm PropertyMap) string {
if i != 0 {
_, _ = buf.WriteString(" ")
}
- vals := pm[k]
+ vals := pm.Slice(k)
strs := make([]string, len(vals))
for i, v := range vals {
strs[i] = v.GQL()
« no previous file with comments | « service/datastore/serialize/serialize_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698