Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Counter examples missing from failing tests #36

@frekw

Description

@frekw

Hi!

When running tests that fail, ExCheck fails to print the failing counter example (which would be the expected behaviour, I assume).

For example, changing the sample to this:

  def prop_push_list do
    for_all({x, y}, {int(), list(int())}) do
      result = push(x, y)
      Enum.at(result, 0) == x and Enum.count(result) == Enum.count(y)
    end
  end

which is expected to fail, the output is the following:

ExCheck.SampleTest
  * test verify sample property (24.8ms)...........................................................................................
..........
  1) test verify sample property (ExCheck.SampleTest)
     test/sample_test.exs:5
     Expected truthy, got false
     code: ExCheck.check(ExCheck.Sample)
     stacktrace:
       test/sample_test.exs:6: (test)

  * test verify sample property with iteration parameter (20.5ms)

  2) test verify sample property with iteration parameter (ExCheck.SampleTest)
     test/sample_test.exs:9
     Expected truthy, got false
     code: ExCheck.check(ExCheck.Sample, 10)
     stacktrace:
       test/sample_test.exs:10: (test)

which doesn't provide me with much help for actually tracking down why a test is failing. Is this expected behaviour?

I'm running Elixir 1.4.0.

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