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

roman-numerals tests has expected and actual swapped #154

Closed
paulmr opened this issue May 11, 2017 · 2 comments
Closed

roman-numerals tests has expected and actual swapped #154

paulmr opened this issue May 11, 2017 · 2 comments

Comments

@paulmr
Copy link
Contributor

paulmr commented May 11, 2017

If you have a bad result while running eunit on the roman-numerals exercise, the error is reported with the expected value and the actual value swapped around, which can be confusing when you are dealing with roman numerals where it isn't always easy to spot the correct one.

For example, if I change the test result for 48 to "OOPS" I get this:

3> eunit:test(roman_numerals_tests).
roman_numerals_tests: convert_48_test...*failed*
in function roman_numerals_tests:'-expect_roman/2-fun-0-'/2 (/meta/p/pmr/src/ext/xerlang/exercises/roman-numerals/_build/test/lib/roman_numerals/test/roman_numerals_tests.erl, line 9)
**error:{assertEqual,[{module,roman_numerals_tests},
              {line,9},
              {expression,"Expected"},
              {expected,"OOPS"},
              {value,"XLVIII"}]}
  output:<<"">>

=======================================================
  Failed: 1.  Skipped: 0.  Passed: 18.
error

(it says expected is OOPS).

@NobbZ
Copy link
Member

NobbZ commented May 15, 2017

Fixed by #155

@NobbZ NobbZ closed this as completed May 15, 2017
@NobbZ
Copy link
Member

NobbZ commented May 15, 2017

Thank you for reporting and fixing this!

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