can someone help explain to me why clojure.test isn’t trying to compare the evaluation of a function I’ve written?
expected: (= (hello_world) "Hello World!")
actual: (not (= "Hello, World!" "Hello World!"))
I think you may be misunderstanding the output
the expected shows the forms, the actual shows the values
^--
since the actual values in the form make it much easier to see what made the test fail, usually
the actual output is what I want, not what I want expected
the expected part is also useful, because it shows me exactly what form was evaluated to get a given value
(though of course you can easily see that by reading the test)
yeah I know! But the thing that’s confusing me is the expected output is more literal than I want
I fix this with a let block
I just want to test that the string the hello_world function returns is “Hello World!”
that is what you are testing...
okay that’s what I thought - then why is it returning false?
because one has a comma in it
there's a plugin, "lein difftest" that highlights data differences in assertions btw
oh wow that’s a stupid mistake
it works with the tests you have already, it just uses different output formats to make it more clear
thanks for the info / second set of eye balls
that’s great I didn’t know about that!