Skip to content

Re-running counterexamples ignores changes to generators #30

Closed
@evnu

Description

@evnu

#10 added re-running failing counterexamples. If the fix to a failing property is to change the generators, the counterexample will keep on failing until the persisted file is deleted.

Consider this obviously failing example:

property "failing" do
  forall x <- nat() do
    is_float(x)
  end
end

Now, we fix this example by changing the generator:

property "failing" do
  forall x <- float() do
    is_float(x)
  end
end

But due to how counterexamples currently work, we still receive an error:

  1) property failing (PropTest)
     test/prop_test.exs:5
     Property Elixir.PropTest.property failing() failed. Counter-Example is:
     [0]
     
     code: nil
     stacktrace:
       (propcheck) lib/properties.ex:107: PropCheck.Properties.handle_check_results/3
       test/prop_test.exs:5: (test)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions