exceptions thrown when running app with failed unittests
cym13 via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 19 15:20:58 PDT 2017
On Sunday, 19 March 2017 at 22:13:21 UTC, Ervin Bosenbacher wrote:
> Its my 2nd day into D, I am already in deep love (:D), and I
> would like to understand whether this is normal behavior or
> something went terribly wrong, so all help is greatly
> appreciated.
>
> [...]
Well, unittests can pass or fail and as the exception states
there it failed. Binary search returns true if it found the
element in the array, false otherwise. 5 is not an element of [1,
3, 6, 7, 9, 15] so binarySearch returned false. Assert throws an
error if its argument is false to it threw. Nothing out of the
ordinary except maybe a broken test.
More information about the Digitalmars-d-learn
mailing list