Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument order flipped in result string, giving confusing output #68

Open
phmarek opened this issue Jul 14, 2020 · 1 comment
Open

Argument order flipped in result string, giving confusing output #68

phmarek opened this issue Jul 14, 2020 · 1 comment

Comments

@phmarek
Copy link
Contributor

phmarek commented Jul 14, 2020

(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
Copy link

phoe commented Jul 14, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants