1
0
mirror of https://github.com/json-iterator/go.git synced 2025-01-29 19:14:05 +02:00

29 Commits

Author SHA1 Message Date
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