Which side is "expected" and which side is "actual"? The assertion is simply that the comparator is "true", and there's a left hand side and a right hand side, it's personal style/taste/choice as to which is the side that has the "actual" and "expected" values. This might be obvious if there's a constant on one side:
assert x == 5 assert "hello" == x But less obvious if you're comparing variables: assert x == y assert y == x I favor lhs/rhs, it's unambiguous and doesn't force you to work to someone else's expectations of what side the "expected" value should go on. ...Paul On Sat, Jun 25, 2016 at 9:38 PM, Antonio Cangiano <[email protected]> wrote: > Elixir tends to score quite well on the usability scale, however, > displaying lhs and rhs in test results is not really user-friendly. > > I would suggest renaming them to more user-friendly options. Someone on > Hacker News suggested expected and actual. Incidentally, those are the > labels used by Clojure. Haskell (HUnit) uses expected and but got. Either > would be clearer. It is a small improvement, but every little bit helps. > > > Thoughts? > > > Best, > Antonio > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/ba5370e1-c59e-4180-b8fc-a02402828e90%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/ba5370e1-c59e-4180-b8fc-a02402828e90%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAD3kWz8Q9ZFaJgeC-G4HZgakViaHQ8CXbmC%3DQLuaWSsHd-Z6UA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
