"is" show unevaluated form?
Opened this issue · 7 comments
(is (compute-something) answer)
test report shows the result of evaluating (compute-something) and the value of the answer
For passing tests shows two of the same thing
In failing tests it shows that the values differ but not, at a glance, what the test was.
Proposal: Always show unevaluated form. On test success only show answer. On test failure show both result of (compute-something) and answer)
Could you please give an example of proposed results?
Current:
(defun you-changed-the-world () nil)
(prove:is (you-changed-the-world) t)
-> You tried (you-changed-the-world) expecting t but got nil
So, I there was failure then everything is correct. Right?
Sorry, I'm confused by your question. Could you rephrase?
I mean, if an assertion was failed, then prove prints unevaluated form. It is how it behaves now.
It will be more useful if you will show an example of the output you wish to be printed in case of success.
Perhaps I'm lagged in version. What I see is that the result of evaluating the form is shown in the report, but not the form that was provided to prove. I know there is a choice of reports. Which kind shows the above?
I think wat @alanruttenberg wants is something like this:
(prove:is (+ 3 3) 5)
× (+ 3 3) => 6 is expected to be 5
(prove:like (format nil "hello") "^bye")
× (FORMAT NIL hello) => "hello" is expected to be like "^bye"
What I have right now is:
(prove:is (+ 3 3) 5)
× 6 is expected to be 5
(prove:like (format nil "hello") "^bye")
× "hello" is expected to be like "^bye"
I agree that the first format is more useful when reading failed test reports. I have made some adjustments that enable the first version. Would this be something that could be merged @fukamachi?