<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I have also been bitten by this order, but I can also blame
myself for not reading the documentation and relying on my
previous experience with other libraries, thus building an
intuition that I believed was universal (when it was in fact not).</p>
<p>I don't think it's worth much arguing about the order of things
or the "intuition" at play here, since fortunately this library
comes with a manual. Very few software match our mental
expectations, and even the one we write are specifically tailored
for our selves of a given time and place. And as we all know, we
are a stranger to our future selves.</p>
<p><br>
</p>
<p>Cheers</p>
<p>Hécate<br>
</p>
<div class="moz-cite-prefix">Le 01/03/2022 à 18:56, Daneel Yaitskov
a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CACNT4y5JwU3pD6UcUNiXkR9zV0UMxgGSEZE=Qk+kYEoP5DfQ3A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi List,</div>
<div>
<p dir="auto">I noticed, that I pay more attention than I
should, when working with assertions, because I am not sure
about argument order i.e. whether the expected value goes
first or vice-versa. Does anybody have similar thought?<br>
</p>
<p>Such subtle detail should be easy to grasp with regular
practice, but I observe difficulties and I suspect that
there is a logical reason for that.<br>
</p>
<p>Unit tests appeared long time ago in Java and spread over
all languages. HUnit library inherited de facto standard
assert function name and signature. I don't know reasoning
behind original signature.<br>
</p>
<p dir="auto">I spe<span style="font-family:arial,sans-serif">ll
"assertEqual" expression as: "Assert that x equals to y"<br>
"y" sounds like a mo</span>del value (i.e. expected
value).</p>
<p dir="auto">In assignments <code>"x <- y"</code> y is
the model value, because it defines <code>"x"</code>.<br>
You get <code>"x"</code> - value on the left not on the
right.</p>
<p>Similar issue with test fixing - I always have to check
first, that an expected value is actually one. There is no
type safety preventing mixing arguments. I had to open and
comprehend a source file with test, because test log is not
100% safe. <br>
</p>
<p dir="auto"><br>
</p>
<br>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature"><br>
Best regards,<br>
Daniil Iaitskov<br>
<br>
<br>
<br>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Hécate ✨
🐦: @TechnoEmpress
IRC: Hecate
WWW: <a class="moz-txt-link-freetext" href="https://glitchbra.in">https://glitchbra.in</a>
RUN: BSD</pre>
</body>
</html>