Here a example where midje could provide more info.
I have this function :
(defn pr134 [element a-seq]
(and (contains? a-seq element) (nil? element))
)
and I have this test-function :
(ns exercises.core-test
(:use midje.sweet)
(:use [exercises.core]))
(facts "about `pr134`"
(fact "it normally return true if the key exist and the value is nil"
(pr134 :a {:a nil :b 2}) => true
(pr134 :b {:a nil :b 2}) => false
))
Then I see this output :
FAIL
"about `pr134` - it normally return true if the key exist and the value is
nil" at (core_test.clj:7)
Expected: true
Actual: false
FAILURE: 1 check failed. (But 1 succeeded.)
So I do not know if the first part contains? or the second one nil? is
wrong.
I know it mentioned before if you look at the way groovy does , you get
more info like this made up example.
(and (contains? a-seq element) (nil? element)) schould be true
| |
|
true
false |
|
|
false
true
Roelof
Op zondag 2 november 2014 03:04:38 UTC+1 schreef Devin Walters (devn):
>
> http://jakemccrary.com/blog/2014/06/22/comparing-clojure-testing-libraries-output/
>
> has some good examples. I'm currently using humane-test-output. It's worked
> nicely for me.
>
> '(Devin Walters)
>
> On Nov 1, 2014, at 7:00 PM, Alex Miller <[email protected]
> <javascript:>> wrote:
>
> Additionally, I think it would be helpful to enumerate example (failing)
> tests and their output by current clojure.test.
>
>
> On Saturday, November 1, 2014 1:58:32 PM UTC-5, Alex Miller wrote:
>>
>> It would be great if someone could enumerate more explicitly what
>> "better" test output means. What are the specific problems in the current
>> test output reporting?
>>
>> Similar problem list for test runner might be useful.
>>
>> Discussion here is fine but ultimately needs to land on a design wiki
>> page.
>>
>> I am happy to do what I can to move this through a process toward
>> inclusion in a release.
>>
>> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected] <javascript:>
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected] <javascript:>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.