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

Unified Diff: service/datastore/properties_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/properties.go ('k') | service/datastore/serialize/serialize.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/properties_test.go
diff --git a/service/datastore/properties_test.go b/service/datastore/properties_test.go
index 42d092fd25586111c1babb6d07fe6790cc4a8720..2d2361d5d0008b63a502c986b9afc896dde91f6f 100644
--- a/service/datastore/properties_test.go
+++ b/service/datastore/properties_test.go
@@ -194,16 +194,16 @@ func TestDSPropertyMapImpl(t *testing.T) {
Convey("PropertyMap load/save err conditions", t, func() {
Convey("empty", func() {
pm := PropertyMap{}
- err := pm.Load(PropertyMap{"hello": {Property{}}})
+ err := pm.Load(PropertyMap{"hello": Property{}})
So(err, ShouldBeNil)
- So(pm, ShouldResemble, PropertyMap{"hello": {Property{}}})
+ So(pm, ShouldResemble, PropertyMap{"hello": Property{}})
npm, _ := pm.Save(false)
So(npm, ShouldResemble, pm)
})
Convey("meta", func() {
Convey("working", func() {
- pm := PropertyMap{"": {MkProperty("trap!")}}
+ pm := PropertyMap{"": MkProperty("trap!")}
_, ok := pm.GetMeta("foo")
So(ok, ShouldBeFalse)
@@ -224,7 +224,7 @@ func TestDSPropertyMapImpl(t *testing.T) {
Convey("too many values picks the first one", func() {
pm := PropertyMap{
- "$thing": {MkProperty(100), MkProperty(200)},
+ "$thing": PropertySlice{MkProperty(100), MkProperty(200)},
}
v, ok := pm.GetMeta("thing")
So(ok, ShouldBeTrue)
« no previous file with comments | « service/datastore/properties.go ('k') | service/datastore/serialize/serialize.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698