lispci/fiveam

Argument order flipped in result string, giving confusing output

phmarek opened this issue · 1 comments

(reformatted) example:

(fiveam:def-test foo ()
  (fiveam:is (<= 1.5 0.9)))

;  Failure Details:
;  --------------------------------
;  FOO []: 
;    0.9 evaluated to 0.9 which is not <= to 1.5

The text output 0.9 which is not <= to 1.5 doesn't match the test in IS.
Perhaps there should be a special case for such comparisons with two operands?

With three arguments it's not a problem:

  (fiveam:is (<= 1.1 1.5 0.9))

;  Failure Details:
;  --------------------------------
;  FOO []: 
;       
; (<= 1.1 1.5 0.9)
; 
;  was NIL..
;  --------------------------------
phoe commented

I assume that FIVEAM expects some sort of equality test there where (+ 2 2) evaluated to 4 which is not = to 5 makes sense, but that's an imperfect heuristic. I think that it may also make fireworks with all sorts of asymmetric binary operators, such as TYPEP.