Skip to content
This repository was archived by the owner on Dec 1, 2021. It is now read-only.

Add WithStack and WithMessage tests #80

Merged
merged 4 commits into from
Aug 7, 2016

Conversation

fabstu
Copy link
Contributor

@fabstu fabstu commented Aug 5, 2016

I don't know about the discussions but I like the API additions, so I took a stab at adding some tests.

Adds testFormatCompleteCompare as additional testing func. The new function takes a string slice as want, wherein stacktraces and non-stacktrace messages are discerned by strings.ContainsAny(want[i], "\n"). For example usage, see TestFormatWithStack & TestFormatWithMessage.

#76 I do not understand the third todo, I thought causer and stack-tracer are separate interfaces so I'm a little bit confused. Is it supposed to add NearestCauseWithStackTrace() or some similar function?

fabstu added 3 commits August 5, 2016 03:06
Adds testFormatCompleteCompare as additional testing func.

The new function takes a string slice as "want", wherein
stacktraces and non-stacktrace messages are discerned by
strings.ContainsAny(want[i], "\n").

For example usage, see TestFormatWithStack & TestFormatWithMessage.
@davecheney
Copy link
Member

This is great, thank you!

@davecheney davecheney merged commit bb6c9f0 into pkg:destructure Aug 7, 2016
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants