Test a function: Difference between revisions

Line 504:
=={{header|Mathematica}}==
<lang Mathematica>myFun[x_] := Block[{y},y = x^2; Assert[y > 5]; Sin[y]]
On[Assert];myFun[1.0]</lang>
 
Output:
->Assert::asrtf: Assertion y>5 failed.
->0.841471</lang>
 
-<pre>Assert::asrtf: Assertion y>5 failed.
->0.841471</langpre>
 
=={{header|NetRexx}}==
Anonymous user