From 166bc6a626fa8101018ab881d38ce1fc1715cf60 Mon Sep 17 00:00:00 2001 From: parroty Date: Sun, 8 Jan 2017 23:25:59 +0900 Subject: [PATCH] Update README to reflect the changes for elixir v1.4 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cd9ba3c..3290ef8 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 ```