Skip to content

Commit

Permalink
Update README to reflect the changes for elixir v1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
parroty committed Jan 8, 2017
1 parent 512dddd commit 166bc6a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ defmodule ExCheck.SampleTest do
alias ExCheck.Sample

property :square do
for_all x in int, do: x * x >= 0
for_all x in int(), do: x * x >= 0
end

property :implies do
for_all x in int do
for_all x in int() do
#implies skip samples that does not satisfy the predicate. Also, it prints x when skip a sample
implies x >= 0 do
x >= 0
Expand All @@ -65,19 +65,19 @@ defmodule ExCheck.SampleTest do
end

property :such_that do
for_all {x, y} in such_that({xx, yy} in {int, int} when xx < yy) do
for_all {x, y} in such_that({xx, yy} in {int(), int()} when xx < yy) do
x < y
end
end

property :concat_list do
for_all {xs, ys} in {list(int), list(int)} do
for_all {xs, ys} in {list(int()), list(int())} do
Enum.count(Sample.concat(xs, ys)) == Enum.count(xs) + Enum.count(ys)
end
end

property :push_list do
for_all {x, y} in {int, list(int)} do
for_all {x, y} in {int(), list(int())} do
result = Sample.push(x, y)
Enum.at(result, 0) == x and Enum.count(result) == Enum.count(y) + 1
end
Expand All @@ -86,7 +86,7 @@ defmodule ExCheck.SampleTest do
# specify iteration count for running test
@tag iterations: 30
property :square_with_iteration_count do
for_all x in int, do: x * x >= 0
for_all x in int(), do: x * x >= 0
end
end
```
Expand Down

0 comments on commit 166bc6a

Please # to comment.