1
0
mirror of https://github.com/json-iterator/go.git synced 2024-11-27 08:30:57 +02:00
Commit Graph

48 Commits

Author SHA1 Message Date
Tim Hockin
7df5a67d0d Add tests for int64 2017-08-10 20:58:49 -07:00
Tao Wen
ce479f3476 fix golint: document exported symbols 2017-07-09 14:57:49 +08:00
Tao Wen
bede1d7f40 fix build; add document for exported symbols 2017-07-09 14:48:34 +08:00
Tao Wen
3b6853d209 fix golint: do not export test types 2017-07-09 14:12:58 +08:00
Tao Wen
4351a2e6e9 fix golint: do not export test types 2017-07-09 11:55:58 +08:00
Tao Wen
891d33b415 fix golint: do not export test types 2017-07-09 11:40:45 +08:00
Tao Wen
ad20f12c34 fix golint: do not export test types 2017-07-09 11:33:03 +08:00
Tao Wen
9ecb1fd36d fix go vet 2017-07-09 11:24:26 +08:00
Tao Wen
e417330822 fuzzy test from 1000 to 100 2017-07-02 18:18:12 +08:00
Tim Hockin
6268a1cbc8 add test for uintptr 2017-07-01 10:57:42 -07:00
Tim Hockin
d56566286c Add tests for omitempty and text methods 2017-07-01 10:28:59 -07:00
Tim Hockin
17eed15fb5 Add tests for omitempty and json methods 2017-07-01 08:26:42 -07:00
Tim Hockin
800df52ccd Add test for omitempty on struct 2017-06-30 20:32:27 -07:00
Tim Hockin
69551ef38f Add test for embedded+omitempty 2017-06-30 15:16:42 -07:00
Tim Hockin
ddfbb0c62e better tests for field name tags 2017-06-30 08:16:43 -07:00
Tim Hockin
c1411e0ad5 Add test for json tag on embedded field 2017-06-29 22:01:16 -07:00
Tim Hockin
9ec64591b6 Enhance test for overlap and embedded 2017-06-29 22:01:16 -07:00
Tim Hockin
b07d1abc4f Add output_test for partial unmarshal 2017-06-29 22:01:14 -07:00
Tim Hockin
79c4040505 sync up some straggler json_tests 2017-06-29 22:00:39 -07:00
Tim Hockin
7fa780bd5d Uncommit files accidentally added 2017-06-29 22:00:27 -07:00
Tim Hockin
12be6e0d43 Add tests for arrays 2017-06-29 07:25:19 -07:00
Tim Hockin
3cfe590a13 Add output test for embedded marshalers 2017-06-29 07:14:33 -07:00
Tim Hockin
45ccfb031f Methods on aliased types are not valid map keys 2017-06-28 09:38:15 -07:00
Tim Hockin
03a2daaeee Add a test for caseless unmarshal 2017-06-28 08:11:38 -07:00
Tim Hockin
4652ac6cc2 Add output tests for embedded types 2017-06-28 08:11:38 -07:00
Tim Hockin
8a9f2b9179 Add output test for manual text marshalers 2017-06-28 08:11:33 -07:00
Tim Hockin
0db2d74de8 Add output test for manual json marshalers 2017-06-28 08:11:02 -07:00
Tim Hockin
d6ef711c18 Better errors in output_tests 2017-06-28 07:48:55 -07:00
Tim Hockin
628fedf63c Add output tests for map keys with TextMarshal 2017-06-28 07:48:55 -07:00
Tim Hockin
5bb7a1f7af Add output test for 'string' tag 2017-06-28 07:48:55 -07:00
Tim Hockin
c2c9981062 catch errors in output_tests 2017-06-28 07:48:55 -07:00
Tim Hockin
e40d614037 Add output test for json tag field names 2017-06-28 07:48:55 -07:00
Tim Hockin
1589ab2fd7 Add output tests for omitempty 2017-06-28 07:48:49 -07:00
Tim Hockin
97ee4ad4a2 Reorganize output_tests for structs
As I added more and more cases, I found the dir structure hard to
navigate.  The new structure follows how you read a type:

   e.g. struct { F *string } -> struct/ptr_string

This exposed some redundant cases and some missing cases, too.
2017-06-27 19:51:13 +01:00
Tim Hockin
f09f778ca9 Reorganize output_tests for slices
As I added more and more cases, I found the dir structure hard to
navigate.  The new structure follows how you read a type:

   e.g. []*string -> slice/ptr_string

This exposed some redundant cases and some missing cases, too.
2017-06-27 19:21:17 +01:00
Tim Hockin
9fc858b117 Reorganize output_tests for maps
As I added more and more cases, I found the dir structure hard to
navigate.  The new structure follows how you read a type:

e.g. map[string]*string -> map/string/ptr_string

This exposed some redundant cases and some missing cases, too. Now
map[string] is the "main" test case that exercises all the variants of
value types, and the other key types are just to prove that they
basically work.
2017-06-27 19:19:37 +01:00
Tim Hockin
f93d25f8b1 Add output tests for slices of slices 2017-06-27 18:28:52 +01:00
Tim Hockin
7cd7a6cc7c Add output tests for maps of maps/slices/structs 2017-06-27 11:58:07 +01:00
Tim Hockin
7d6c9374e8 Add output test for structs of struct ptrs 2017-06-27 11:46:55 +01:00
Tim Hockin
e16ee7f8ac Add output tests for structs of slices and maps 2017-06-27 11:41:17 +01:00
Tim Hockin
cf6367546b Add output tests for structs of structs 2017-06-27 11:28:17 +01:00
Tim Hockin
507a446eda Add output_tests for structs of ptrs 2017-06-26 06:09:00 -07:00
Tim Hockin
76eefc25ba Add output_test for empty structs 2017-06-26 05:45:54 -07:00
Tim Hockin
21a16bd252 Add output_tests for structs of builtins 2017-06-26 05:37:47 -07:00
Tim Hockin
8f3de9c412 Adapt tests to use new Config structs
the unit test uses compatible mode.  The benchmarks measure compat,
default, and fastest.

This still fails for strings and slices and maps all over the place.
2017-06-25 10:29:48 -07:00
Tim Hockin
5d3508979f Add output tests for slices of builtins 2017-06-25 10:00:35 -07:00
Tim Hockin
7480e41836 Add output tests for maps of builtins
This tests for exact stdlib compatibility.
2017-06-11 21:09:56 -07:00
Tim Hockin
9215b3c508 Add output tests for builtin types
This fuzzes a type, marshals it with stdlib and json-iterator, compares,
then unmarshals with stdlib and json-iterator and compares.  This is
checking for literal, byte-for-byte compatibility.

In every case the test is exactly the same.

It also include benchmark functions to compare stdlib vs json-iterator.

This depends on a couple PRs to be merged in gofuzz.
2017-06-11 21:04:59 -07:00