I encountered this strange behaviour today. Given the following code:
property "some property" do
forall i <- integer() do
IO.inspect(i, label: "i")
test_some_property()
end
end
property "some other property" do
forall i <- integer() do
IO.inspect(i, label: "ii")
test_some_property()
end
test_some_other_property()
end
defp test_some_property do
true
end
defp test_some_other_property do
true
end
only the code block with the label: i with be executed. Obviously it makes little sense to have test_some_other_property() after the forall but given my code was more complex than the example it took me a while to find the problem.
Is that the expected behaviour? Would it make sense to give a warning or error?
I encountered this strange behaviour today. Given the following code:
only the code block with the
label: iwith be executed. Obviously it makes little sense to havetest_some_other_property()after theforallbut given my code was more complex than the example it took me a while to find the problem.Is that the expected behaviour? Would it make sense to give a warning or error?