File tree 5 files changed +22
-7
lines changed
5 files changed +22
-7
lines changed Original file line number Diff line number Diff line change 7
7
script : make clean && make lint && make test && make test
8
8
9
9
go :
10
- - 1.7
10
+ - " 1.10 "
11
11
12
12
env :
13
13
- GO15VENDOREXPERIMENT=1
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ bench: ffize all
43
43
44
44
clean :
45
45
go clean -i github.com/pquerna/ffjson/...
46
- rm -rf tests/ff/* _ffjson.go tests/* _ffjson.go tests/ffjson-inception*
46
+ find . -name ' *_ffjson.go' -delete
47
+ find . -name ' ffjson-inception*' -delete
47
48
48
49
.PHONY : deps clean test fmt install all
Original file line number Diff line number Diff line change @@ -445,7 +445,6 @@ func (ffl *FFLexer) Scan() FFTok {
445
445
if ffl .captureAll {
446
446
ffl .Output .WriteByte (c )
447
447
}
448
- break
449
448
case 't' :
450
449
ffl .Output .WriteByte ('t' )
451
450
tok = ffl .wantBytes (true_bytes , FFTok_bool )
@@ -471,6 +470,7 @@ func (ffl *FFLexer) Scan() FFTok {
471
470
default :
472
471
tok = FFTok_error
473
472
ffl .Error = FFErr_invalid_char
473
+ goto lexed
474
474
}
475
475
}
476
476
Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ func TestIssue6458(t *testing.T) {
251
251
t .Fatal (err )
252
252
}
253
253
254
- if want := `{"M":"ImZvbyI= "}` ; string (b ) != want {
254
+ if want := `{"M":"foo "}` ; string (b ) != want {
255
255
t .Errorf ("Marshal(x) = %#q; want %#q" , b , want )
256
256
}
257
257
}
Original file line number Diff line number Diff line change @@ -149,11 +149,19 @@ func TestFuzzCycle(t *testing.T) {
149
149
rFF := FfFuzz {}
150
150
r := Fuzz {}
151
151
for i := 0 ; i < 1000 ; i ++ {
152
- if true || i > 0 {
153
- // TODO: Re-enable after fixing:
154
- // https://github.com/pquerna/ffjson/issues/82
152
+ if i > 0 {
155
153
f .RandSource (rand .New (rand .NewSource (int64 (i * 324221 ))))
156
154
f .Fuzz (& r )
155
+
156
+ // TODO: remove these after we marshal 0.00000012 to 1.2e-7.
157
+ r .I = 0
158
+ r .J = 0
159
+ r .IP = nil
160
+ r .Jp = nil
161
+ r .Ia = []float32 {0 }
162
+ r .Ja = []float64 {0 }
163
+ r .Iap = nil
164
+ r .Jap = nil
157
165
}
158
166
rFF .A = r .A
159
167
rFF .B = r .B
@@ -242,6 +250,12 @@ func TestFuzzOmitCycle(t *testing.T) {
242
250
if i > 0 {
243
251
f .RandSource (rand .New (rand .NewSource (int64 (i * 324221 ))))
244
252
f .Fuzz (& r )
253
+
254
+ // TODO: remove these after we marshal 0.00000012 to 1.2e-7.
255
+ r .J = 0
256
+ r .Jp = nil
257
+ r .Ja = []float64 {0 }
258
+ r .Jap = nil
245
259
}
246
260
rFF .A = r .A
247
261
rFF .B = r .B
You can’t perform that action at this time.
0 commit comments