-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathElf_prop.re
33 lines (31 loc) · 896 Bytes
/
Elf_prop.re
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
open Framework;
open QCheckRely;
open Generator.Fantasy;
open Lib.Elf;
let {describe} = extendDescribe(QCheckRely.Matchers.matchers);
/* Porperties Based Tests */
describe("Elf Invariance", ({test}) => {
test("Elf value should always be positive", ({expect})
=> {
QCheck.Test.make(
~count=1000,
~name="elf value should always be positive",
elf_arbitrary,
elf =>
value(elf) > 0
)
|> expect.ext.qCheckTest;
();
})
/* test("Elf value should always be the product of race and role", ({expect}) => {
QCheck.Test.make(
~count=1000,
~name="Elf value should always be the product of race and role",
elf_arbitratry,
elf =>
value(elf) == race_to_enum(elf.race) * role_to_enum(elf.role)
)
|> expect.ext.qCheckTest;
();
}); */
});