Index: service/datastore/properties_test.go |
diff --git a/service/datastore/properties_test.go b/service/datastore/properties_test.go |
index be47cae1a14173c2125cac30311df4729287bbc6..581b1f6a5f5cbdbb7f7d554812326f9913b43281 100644 |
--- a/service/datastore/properties_test.go |
+++ b/service/datastore/properties_test.go |
@@ -51,6 +51,27 @@ func TestProperties(t *testing.T) { |
So(pv.IndexSetting(), ShouldEqual, ShouldIndex) |
So(pv.Type().String(), ShouldEqual, "PTInt") |
}) |
+ Convey("int32", func() { |
+ pv := MkProperty(int32(32)) |
+ So(pv.Value(), ShouldHaveSameTypeAs, int64(32)) |
+ So(pv.Value(), ShouldEqual, 32) |
+ So(pv.IndexSetting(), ShouldEqual, ShouldIndex) |
+ So(pv.Type().String(), ShouldEqual, "PTInt") |
+ }) |
+ Convey("uint32", func() { |
+ pv := MkProperty(uint32(32)) |
+ So(pv.Value(), ShouldHaveSameTypeAs, int64(32)) |
+ So(pv.Value(), ShouldEqual, 32) |
+ So(pv.IndexSetting(), ShouldEqual, ShouldIndex) |
+ So(pv.Type().String(), ShouldEqual, "PTInt") |
+ }) |
+ Convey("byte", func() { |
+ pv := MkProperty(byte(32)) |
+ So(pv.Value(), ShouldHaveSameTypeAs, int64(32)) |
+ So(pv.Value(), ShouldEqual, 32) |
+ So(pv.IndexSetting(), ShouldEqual, ShouldIndex) |
+ So(pv.Type().String(), ShouldEqual, "PTInt") |
+ }) |
Convey("bool (true)", func() { |
pv := MkProperty(mybool(true)) |
So(pv.Value(), ShouldBeTrue) |