summaryrefslogtreecommitdiff
path: root/spew/common_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]>
2016-10-29Update license copyright years.Dave Collins
Several files had been updated since the listed years. This updates them accordingly.
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-02-23Add support for sorting keys that are arrays.Anaminus
2013-12-01tests: fix TestSortValues on 32-bits platformsPatrick Mezard
reflect.DeepEqual fails when comparing reflect.Value containing float64. I think it cannot make sense of reflect.Value pointer tricks and directly compare reflect.Value.val fields which contain the float value in 64 bits, but a pointer to the float in 32 bits. Fortunately, interface{} which have a similar memory layout, compare correctly, so we just turn the []reflect.Value into []interface{}.
2013-11-14Add additional tests for new sortValues code.Dave Collins
This brings the test coverage back to 100%.
2013-11-14Update imports for previous.Dave Collins
2013-11-14Move TestSortValues to common_test.go.Dave Collins
This commit moves the TestSortValues function from dump_test.go to common_test.go to mirror the new implementation location. It also slightly formats the tests to be consistent with the rest of the package.
2013-02-07Fix a couple of comment typos.Dave Collins
2013-02-03Rename pad function to indent.Dave Collins
The name indent better describes the function. This also will help differentiate the function from planned functions that are intended to perform padding for the purposes of aligning fields, types, and values.
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 disable method options.Dave Collins
This commit adds tests for the DisableMethods and DisablePointerMethods options. All combinations of method options and Stringer interface invocation for both pointer receivers and non-pointer receivers are tested.
2013-01-20Add tests for types with custom Error interface.Dave Collins
2013-01-20Abstract common test types and functions.Dave Collins