diff options
| author | Dave Collins <[email protected]> | 2013-01-20 19:55:55 -0600 |
|---|---|---|
| committer | Dave Collins <[email protected]> | 2013-01-20 19:55:55 -0600 |
| commit | f2641d5e6e2ffc7bb5d847b6552149f4f3b02136 (patch) | |
| tree | 3fee583a4333a35dd7824d1f717d550389ee1f52 /spew/common_test.go | |
| parent | cddf8663bd7f61d62278c3fc6d2a2711fa87e115 (diff) | |
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.
Diffstat (limited to 'spew/common_test.go')
| -rw-r--r-- | spew/common_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spew/common_test.go b/spew/common_test.go index 4b786e6..0f1715d 100644 --- a/spew/common_test.go +++ b/spew/common_test.go @@ -59,6 +59,17 @@ type indirCir3 struct { ps1 *indirCir1 } +// embed is used to test embedded structures. +type embed struct { + a string +} + +// embedwrap is used to test embedded structures. +type embedwrap struct { + *embed + e *embed +} + // panicer is used to intentionally cause a panic for testing spew properly // handles them type panicer int |
