-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
customized comparisons for output #63
Labels
Comments
ghost
assigned aavogt
Sep 30, 2013
Not sure what to do here. My first impression is "too much hassle for no gain". But then again, what may be no gain for me, may be important to you. So if you really feel like hacking on this, go for it, but be prepared that we bikeshed it to death if it gets ugly.. |
aavogt
added a commit
to aavogt/doctest-haskell
that referenced
this issue
Oct 2, 2013
No tests exist for the comparison function yet. In other words, I removed Runner.Example.mkResult and the replacement has no unit tests. The default doctestEq is also slightly different with respect to trailing whitespace, so there is a test failure: Main.doctest ignores trailing whitespace when matching test output FAILED trailing-whitespace ["Foo.hs"]
aavogt
added a commit
to aavogt/doctest-haskell
that referenced
this issue
Oct 7, 2013
aavogt
added a commit
to aavogt/doctest-haskell
that referenced
this issue
Jun 28, 2014
No tests exist for the comparison function yet. In other words, I removed Runner.Example.mkResult and the replacement has no unit tests. The default doctestEq is also slightly different with respect to trailing whitespace, so there is a test failure: Main.doctest ignores trailing whitespace when matching test output FAILED trailing-whitespace ["Foo.hs"]
aavogt
added a commit
to aavogt/doctest-haskell
that referenced
this issue
Jun 28, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use doctest to check that some types can be properly inferred. I would like some way to customize the comparison so that the following tests would be accepted:
This fails because
a
isn'tb
... though they mean exactly the same thing:This fails because of whitespace.... sometimes ghc breaks type signatures
into different lines
As far as I know, there is no way to get a String in ghci out of
:type
, so I can't even do something confusing like:One idea might be to make the comparison happen in the ghci session using whatever
==
is in scope (or some other/better function name). In other words,will send two lines to ghci like:
The text was updated successfully, but these errors were encountered: