aboutsummaryrefslogtreecommitdiff
path: root/objects/properties_test.go
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2017-10-03 14:59:45 +0200
committerLaria Carolin Chabowski <laria@laria.me>2017-10-03 15:01:38 +0200
commit4de510778b6e55a2238374834d00b03726da76d4 (patch)
tree7b2d8b8f4db5d0bc2b81c8dfb31921fa59d45c6d /objects/properties_test.go
parentdb0c023fd0d756912c3f575c6ac65e99fda573cc (diff)
downloadpetrific-4de510778b6e55a2238374834d00b03726da76d4.tar.gz
petrific-4de510778b6e55a2238374834d00b03726da76d4.tar.bz2
petrific-4de510778b6e55a2238374834d00b03726da76d4.zip
Documentation
Diffstat (limited to 'objects/properties_test.go')
-rw-r--r--objects/properties_test.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/objects/properties_test.go b/objects/properties_test.go
index 96df5c8..7243ce3 100644
--- a/objects/properties_test.go
+++ b/objects/properties_test.go
@@ -22,13 +22,13 @@ func TestPropEscape(t *testing.T) {
func TestPropertyMarshalling(t *testing.T) {
tests := []struct {
name string
- in properties
+ in Properties
want string
}{
- {"empty", properties{}, ""},
- {"single", properties{"foo": "bar"}, "foo=bar"},
- {"simple", properties{"foo": "bar", "bar": "baz"}, "bar=baz&foo=bar"},
- {"escapes", properties{"foo&bar": "%=baz", "?": "!"}, "%3f=%21&foo%26bar=%25%3dbaz"},
+ {"empty", Properties{}, ""},
+ {"single", Properties{"foo": "bar"}, "foo=bar"},
+ {"simple", Properties{"foo": "bar", "bar": "baz"}, "bar=baz&foo=bar"},
+ {"escapes", Properties{"foo&bar": "%=baz", "?": "!"}, "%3f=%21&foo%26bar=%25%3dbaz"},
}
for _, subtest := range tests {
@@ -48,16 +48,16 @@ func TestPropertyUnmarshalling(t *testing.T) {
tests := []struct {
name string
in string
- want properties
+ want Properties
}{
- {"empty", "", properties{}},
- {"single", "foo=bar", properties{"foo": "bar"}},
- {"simple", "bar=baz&foo=bar", properties{"foo": "bar", "bar": "baz"}},
- {"escapes", "%3f=%21&foo%26bar=%25%3dbaz", properties{"foo&bar": "%=baz", "?": "!"}},
+ {"empty", "", Properties{}},
+ {"single", "foo=bar", Properties{"foo": "bar"}},
+ {"simple", "bar=baz&foo=bar", Properties{"foo": "bar", "bar": "baz"}},
+ {"escapes", "%3f=%21&foo%26bar=%25%3dbaz", Properties{"foo&bar": "%=baz", "?": "!"}},
}
for _, subtest := range tests {
- have := make(properties)
+ have := make(Properties)
err := have.UnmarshalText([]byte(subtest.in))
if err != nil {