Fork me on GitHub
#hyperfiddle
<
2023-01-22
>
didibus03:01:34

Is there a way to get this: https://clojureverse.org/t/hyperfiddle-rcf-turn-your-rich-comment-forms-into-tests/7866/3?u=didibus reporting back? Specifically how it was doing:

(tests
  (+ 5 5) := 20)

āŒ user:33 
 in (+ 5 5)

10
 :ā‰  
20
It seems if I copy/paste the same reporter I don't get the above anymore, because :expected and :actual are different?

xificurC07:01:50

Hi didibus, could you provide a bit more information please? What output are you getting right now? What setup are you using?

didibus18:01:12

Right now I get the default output, it just says: actual: expected:

didibus18:01:36

What I want is the code under test, then the inequality

xificurC19:01:42

Thanks. On master rcf if I start a REPL for your code I get

expected: (= 20 (+ 5 5))
  actual: (not (= 20 10))
What is missing from this output for you?

didibus20:01:31

I need (+ 5 5) seperate from the RCF code, the expected code is not (= 20 (+ 5 5)) but only (+ 5 5) And on the actual, I want it like it was:

20
!=
10

didibus20:01:29

So I'd want something like: (+ 5 5) failed test at user:33 10 != 20

didibus20:01:20

It's not that something is missing, but the way it is outputted it takes me longer to parse, which slows me down. I'd like a clearer output so it's faster for me to figure out what code failed what test and how it failed.

xificurC20:01:16

I see. The output you see matches a clojure.test report, we've been making changes to be more compatible with the ecosystem around it to gain more leverage. This is very crude but shows that the reporter is a standard clojure.test reporter. The output of this is

Failed: (+ 5 5)
10
!=
20
The map m also has :file and :line metadata in my REPL

didibus23:01:26

Are these nth reliable? Or only works for this example? Ya, I saw it's changed to be the standard clojure.test output. But I find that a bit hard to parse on the REPL when I run my tests. I couldn't find a way to extract reliably from the map what was my code from the code added by Rcf for the check. I'll try what you pasted and see if it's reliable.