Ponycheck¶
primitive val Ponycheck
Constructors¶
create¶
new val create()
: Ponycheck val^
Returns¶
- Ponycheck val^
Public Functions¶
for_all[T: T]¶
convenience method for running 1 to many properties as part of one ponytest UnitTest.
Example:
class MyTestWithSomeProperties is UnitTest
fun name(): String => "mytest/withMultipleProperties"
fun apply(h: TestHelper) =>
Ponycheck.for_all[U8](recover Generators.unit[U8](0) end, h)(
{(u, h) =>
h.assert_eq(u, 0)
consume u
})
fun box for_all[T: T](
gen: Generator[T] val,
h: TestHelper val)
: ForAll[T] ref
Parameters¶
- gen: Generator[T] val
- h: TestHelper val
Returns¶
- ForAll[T] ref
for_all2[T1: T1, T2: T2]¶
fun box for_all2[T1: T1, T2: T2](
gen1: Generator[T1] val,
gen2: Generator[T2] val,
h: TestHelper val)
: ForAll2[T1, T2] ref
Parameters¶
- gen1: Generator[T1] val
- gen2: Generator[T2] val
- h: TestHelper val
Returns¶
- ForAll2[T1, T2] ref
for_all3[T1: T1, T2: T2, T3: T3]¶
fun box for_all3[T1: T1, T2: T2, T3: T3](
gen1: Generator[T1] val,
gen2: Generator[T2] val,
gen3: Generator[T3] val,
h: TestHelper val)
: ForAll3[T1, T2, T3] ref
Parameters¶
- gen1: Generator[T1] val
- gen2: Generator[T2] val
- gen3: Generator[T3] val
- h: TestHelper val
Returns¶
- ForAll3[T1, T2, T3] ref
for_all4[T1: T1, T2: T2, T3: T3, T4: T4]¶
fun box for_all4[T1: T1, T2: T2, T3: T3, T4: T4](
gen1: Generator[T1] val,
gen2: Generator[T2] val,
gen3: Generator[T3] val,
gen4: Generator[T4] val,
h: TestHelper val)
: ForAll4[T1, T2, T3, T4] ref
Parameters¶
- gen1: Generator[T1] val
- gen2: Generator[T2] val
- gen3: Generator[T3] val
- gen4: Generator[T4] val
- h: TestHelper val
Returns¶
- ForAll4[T1, T2, T3, T4] ref
eq¶
fun box eq(
that: Ponycheck val)
: Bool val
Parameters¶
- that: Ponycheck val
Returns¶
- Bool val
ne¶
fun box ne(
that: Ponycheck val)
: Bool val
Parameters¶
- that: Ponycheck val
Returns¶
- Bool val