File: Fuzz.v

package info (click to toggle)
coq-quickchick 2.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,432 kB
  • sloc: ml: 4,367; ansic: 789; makefile: 388; sh: 27; python: 4; lisp: 2; perl: 2
file content (17 lines) | stat: -rw-r--r-- 391 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
From QuickChick Require Import QuickChick.
Import MonadNotation.
Require Import Arith.

Definition test_prop (n : nat) := Some (n <=? 10).

Definition gen : G nat := choose (0,5).

Definition fuzz (n : nat) : G nat :=
  x <- choose (1,3);;
  ret (n + x).

Definition fuzzer :=
  fun (u : unit) => fuzzLoop gen fuzz show test_prop.

QuickChickDebug Debug On.
FuzzChick test_prop (fuzzer tt).