summaryrefslogtreecommitdiff
path: root/spew/format_test.go
AgeCommit message (Collapse)Author
2024-01-14flatten pathsv1.1.3Jeff Carr
Signed-off-by: Jeff Carr <[email protected]>
2024-01-14clean go modJeff Carr
Signed-off-by: Jeff Carr <[email protected]>
2018-01-21vet: fix vet warningsDavid Hill
2017-07-11travis: test against 1.8.xDavid Hill
2016-10-29Correct a copy of misspellings found by misspell.v1.1.0Dave Collins
2016-10-29Update license copyright years.Dave Collins
Several files had been updated since the listed years. This updates them accordingly.
2015-06-19Add support for limited mode without unsafe pkg.Dave Collins
This commit adds support for compiling spew without the unsafe package. When compiled without the unsafe package, some of the more advanced features such as invoking stringers on pointers from non-pointer variables and unexported struct fields are not available. By default, spew will be compiled in the limited mode for Google App Engine since the unsafe package is not available there. Additionally, spew can be compiled without the unsafe package manually by specifying the "disableunsafe" build tag. Finally, a new package-level constant named "UnsafeDisabled" has been exposed which can be used to programmatically determine if spew was compiled with access to the unsafe package.
2015-04-10Enable methods to sort map keys and spew itself as last resortTim Hockin
If enabled by flags, try to use methods to stringify map keys and sort on that. If we can't use primitive sorting and we can't use methods, we can still fall back on spew itself. If SpewKeys is enabled, use Sprintf("%#v") to generate a string and sort by that.
2015-01-19make nil maps appear different than empty mapsdeads2k
2013-10-27config: add SortKeys option to sort native map keys before displayPatrick Mezard
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-09-09Add tests for nil slice change.Dave Collins
This commit adds tests for the nil slice change.
2013-03-27Add tests for packed nil interfaces.Dave Collins
This commit adds tests for nil interfaces packed inside maps and slices to test the recently added fix for issue #12.
2013-01-20Add tests for structs with multiple equiv fields.Dave Collins
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-20Add tests for sub-interfaces.Dave Collins
2013-01-20Add formatter passthrough tests for non %v verbs.Dave Collins
2013-01-20Add tests for types with custom Error interface.Dave Collins
2013-01-20Add tests for custom type that panics in Stringer.Dave Collins
2013-01-20Add tests for maps with multiple entries.Dave Collins
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-17Update test summaries.Dave Collins
2013-01-17Add test for new %#v and %#+v Formatter flags.Dave Collins
2013-01-14Add full suite of tests for Formatter.Dave Collins