File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ fn test_surrogate() {
1616}
1717
1818fn test_invalid_surrogate () {
19- if x := json2 .decode[string ](r '"\ud83d"' ) {
19+ if _ := json2 .decode[string ](r '"\ud83d"' ) {
2020 assert false
2121 } else {
2222 if err is json2.JsonDecodeError {
@@ -26,7 +26,7 @@ fn test_invalid_surrogate() {
2626 }
2727 }
2828
29- if x := json2 .decode[string ](r '"\ud83d\n\n\n\n"' ) {
29+ if _ := json2 .decode[string ](r '"\ud83d\n\n\n\n"' ) {
3030 assert false
3131 } else {
3232 if err is json2.JsonDecodeError {
@@ -36,7 +36,7 @@ fn test_invalid_surrogate() {
3636 }
3737 }
3838
39- if x := json2 .decode[string ](r '"\ud83d\ud83d"' ) {
39+ if _ := json2 .decode[string ](r '"\ud83d\ud83d"' ) {
4040 assert false
4141 } else {
4242 if err is json2.JsonDecodeError {
@@ -46,7 +46,7 @@ fn test_invalid_surrogate() {
4646 }
4747 }
4848
49- if x := json2 .decode[string ](r '"\ude00\ud83d"' ) {
49+ if _ := json2 .decode[string ](r '"\ude00\ud83d"' ) {
5050 assert false
5151 } else {
5252 if err is json2.JsonDecodeError {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ struct CrossVerifyResult {
55}
66
77fn test_main () {
8- x := json2 .decode[CrossVerifyResult]('' ) or {
8+ _ := json2 .decode[CrossVerifyResult]('' ) or {
99 assert err.msg ().contains ('1:1: Invalid json: empty string' )
1010 return
1111 }
Original file line number Diff line number Diff line change @@ -98,22 +98,22 @@ fn test_number() {
9898 assert json.decode[i8 ]('127' )! == 127
9999 assert json.decode[i8 ]('-128' )! == - 128
100100
101- if x := json.decode[i8 ]('128' ) {
101+ if _ := json.decode[i8 ]('128' ) {
102102 assert false
103103 }
104- if x := json.decode[i8 ]('130' ) {
104+ if _ := json.decode[i8 ]('130' ) {
105105 assert false
106106 }
107- if x := json.decode[i8 ]('1000' ) {
107+ if _ := json.decode[i8 ]('1000' ) {
108108 assert false
109109 }
110- if x := json.decode[i8 ]('-129' ) {
110+ if _ := json.decode[i8 ]('-129' ) {
111111 assert false
112112 }
113- if x := json.decode[i8 ]('-130' ) {
113+ if _ := json.decode[i8 ]('-130' ) {
114114 assert false
115115 }
116- if x := json.decode[i8 ]('-1000' ) {
116+ if _ := json.decode[i8 ]('-1000' ) {
117117 assert false
118118 }
119119}
You can’t perform that action at this time.
0 commit comments