File: mutation.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-- 475 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
From QuickChick Require Import QuickChick.
From Coq Require Import List String ExtrOcamlNatInt.
Import ListNotations.

Local Instance this_section : Mutant.section := "test"%string.

Definition prop_example :=
  let x := 10 mutant! 20 in
  let y := 1 mutant: "foo" 2 mutant! 3 mutant: "bar" 4 in
  whenFail (show x ++ " + " ++ show y ++ " <> 11")%string
           (x + y = 11 ?).

Definition main := runTests [
  qc "example" prop_example
].

Extraction "mutation.ml" main.