Skip to content

Commit

Permalink
Merge pull request #88 from isaacabraham/master
Browse files Browse the repository at this point in the history
Default message texts for isTrue and isFalse
  • Loading branch information
Henrik Feldt authored Jan 25, 2017
2 parents 447cd48 + 56893c2 commit 7c4b1ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Expecto/Expect.fs
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,20 @@ let inline equal (actual : 'a) (expected : 'a) format =
/// Expects the two values not to equal each other.
let notEqual (actual : 'a) (expected : 'a) format =
if expected = actual then
Tests.failtestf "%s. Actual value was equal to %A but had expected it non-equal."
Tests.failtestf "%s. Actual value was equal to %A but had expected them to be non-equal."
format actual

/// Expects the value to be false.
let isFalse actual format =
if not actual then ()
else
Tests.failtest format
Tests.failtestf "%s. Actual value was true but had expected it to be false." format

/// Expects the value to be true.
let isTrue actual format =
if actual then ()
else
Tests.failtest format
Tests.failtestf "%s. Actual value was false but had expected it to be true." format

/// Expects the `sequence` to contain the `element`.
let contains sequence element format =
Expand Down Expand Up @@ -464,4 +464,4 @@ let isFasterThanSub (f1:Performance.Measurer<_,_>->'a) (f2:Performance.Measurer<
let isFasterThan (f1:unit->'a) (f2:unit->'a) format =
isFasterThanSub (fun measurer -> measurer f1 ())
(fun measurer -> measurer f2 ())
format
format

0 comments on commit 7c4b1ec

Please sign in to comment.