Commit Graph

12 Commits

Author SHA1 Message Date
Patrick Mezard 1fdf49f1b9 config: add SortKeys option to sort native map keys before display
If ConfigState.SortKeys is true, then dump and format will sort map keys
before displaying them. Only native types (bool, ints, uint, uintptr,
string) are supported, other slices are left unchanged.

The motivation is to have more diffable output, mostly for test purpose.
2013-10-27 23:44:49 +01:00
Dave Collins 8f603f64f9 Add tests for nil slice change.
This commit adds tests for the nil slice change.
2013-09-09 20:43:39 -05:00
Dave Collins 3bcb0679af Add tests for packed nil interfaces.
This commit adds tests for nil interfaces packed inside maps and slices to
test the recently added fix for issue #12.
2013-03-27 22:50:10 -05:00
Dave Collins f2641d5e6e Add tests for structs with multiple equiv fields.
This commit adds tests for a struct which has an embedded struct pointer
and a field that is a pointer to the same object.  This ensures the cycle
detection is properly reset between fields.
2013-01-20 19:55:55 -06:00
Dave Collins 3ad8c5b5ee Add tests for sub-interfaces. 2013-01-20 15:27:57 -06:00
Dave Collins eba42209a7 Add formatter passthrough tests for non %v verbs. 2013-01-20 14:03:59 -06:00
Dave Collins 89496a6569 Add tests for types with custom Error interface. 2013-01-20 13:41:53 -06:00
Dave Collins ad1d81b355 Add tests for custom type that panics in Stringer. 2013-01-20 12:31:42 -06:00
Dave Collins 5c8d842977 Add tests for maps with multiple entries.
Previously, the tests did not include maps with more than a single entry
since the iteration order is randomized and the tests only accepted a
single valid expected value.  This commit modifies the tests to accept
multiple valid expected values and adds tests for a multi-entry map to
both Dump and Formatter.
2013-01-20 12:02:36 -06:00
Dave Collins e48df78db8 Update test summaries. 2013-01-17 21:40:54 -06:00
Dave Collins 8591790312 Add test for new %#v and %#+v Formatter flags. 2013-01-17 18:51:47 -06:00
Dave Collins 34805dbdb5 Add full suite of tests for Formatter. 2013-01-14 17:31:27 -06:00