Skip to content

Commit

Permalink
Allow ExUnit assert function for forall return
Browse files Browse the repository at this point in the history
  • Loading branch information
drselump14 committed Aug 30, 2021
1 parent d2c3d34 commit 61441e3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/propcheck.ex
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,13 @@ defmodule PropCheck do
unquote(rawtype),
fn unquote(var) ->
try do
unquote(prop)
case unquote(prop) do
return when is_boolean(return) -> return
return when is_tuple(return) -> return
# Convert truthy value to boolean true and falsey value to boolean false
# This is necesary to accomodate
return -> !!return
end
rescue
e in ExUnit.AssertionError ->
if verbose? do
Expand Down

0 comments on commit 61441e3

Please sign in to comment.