Skip to content

Ponycheck

[Source]

primitive val Ponycheck

Constructors

create

[Source]

new val create()
: Ponycheck val^

Returns


Public Functions

for_all[T: T]

[Source]

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

Returns


for_all2[T1: T1, T2: T2]

[Source]

fun box for_all2[T1: T1, T2: T2](
  gen1: Generator[T1] val,
  gen2: Generator[T2] val,
  h: TestHelper val)
: ForAll2[T1, T2] ref

Parameters

Returns


for_all3[T1: T1, T2: T2, T3: T3]

[Source]

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

Returns


for_all4[T1: T1, T2: T2, T3: T3, T4: T4]

[Source]

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

Returns


eq

[Source]

fun box eq(
  that: Ponycheck val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: Ponycheck val)
: Bool val

Parameters

Returns