We now include and pass tests

Signed-off-by: Levi Gross <levi@levigross.com>
This commit is contained in:
Levi Gross
2017-11-26 18:55:54 -05:00
parent 56cec8d348
commit b5dedd1b9e
2 changed files with 13 additions and 4 deletions
+2 -2
View File
@@ -48,8 +48,8 @@ var primitiveStringDecoders = map[reflect.Kind]string{
reflect.Uint32: "in.Uint32Str()",
reflect.Uint64: "in.Uint64Str()",
reflect.Uintptr: "in.UintptrStr()",
reflect.Float32: "in.Float32()Str",
reflect.Float64: "in.Float64()Str",
reflect.Float32: "in.Float32Str()",
reflect.Float64: "in.Float64Str()",
}
var customDecoders = map[string]string{
+11 -2
View File
@@ -38,8 +38,11 @@ type PrimitiveTypes struct {
Uint32String uint32 `json:",string"`
Uint64String uint64 `json:",string"`
Float32 float32 `json:",string"`
Float64 float64 `json:",string"`
Float32 float32
Float64 float64
Float32String float32 `json:",string"`
Float64String float64 `json:",string"`
Ptr *string
PtrNil *string
@@ -77,6 +80,9 @@ var primitiveTypesValue = PrimitiveTypes{
Float32: 1.5,
Float64: math.MaxFloat64,
Float32String: 1.5,
Float64String: math.MaxFloat64,
Ptr: &str,
}
@@ -110,6 +116,9 @@ var primitiveTypesString = "{" +
`"Float32":` + fmt.Sprint(1.5) + `,` +
`"Float64":` + fmt.Sprint(math.MaxFloat64) + `,` +
`"Float32String":"` + fmt.Sprint(1.5) + `",` +
`"Float64String":"` + fmt.Sprint(math.MaxFloat64) + `",` +
`"Ptr":"bla",` +
`"PtrNil":null` +