Skip to content

v1.0.0

Compare
Choose a tag to compare
@KtorZ KtorZ released this 26 Jul 14:27
· 9 commits to main since this release
v1.0.0
55f22cc

Added

  • Initial fuzz API covering various primitives:
    • Labelling

      • label(str: String) -> Void
      • label_when(predicate: Bool, str: String, default: String) -> Void
    • Primitives

      • constant(a: a) -> Fuzzer<a>
      • option(fuzz_a: Fuzzer<a>) -> Fuzzer<Option<a>>
      • bool() -> Fuzzer<Bool>
    • Int

      • int() -> Fuzzer<Int>
      • int_at_least(min: Int) -> Fuzzer<Int>
      • int_at_most(max: Int) -> Fuzzer<Int>
      • int_between(min: Int, max: Int) -> Fuzzer<Int>
      • byte() -> Fuzzer<Int>
    • ByteArray

      • bytearray() -> Fuzzer<ByteArray>
      • bytearray_fixed(len: Int) -> Fuzzer<ByteArray>
      • bytearray_between(min: Int, max: Int) -> Fuzzer<ByteArray>
    • List

      • list(fuzzer: Fuzzer<a>) -> Fuzzer<List<a>>
      • list_at_least(fuzzer: Fuzzer<a>, min: Int) -> Fuzzer<List<a>>
      • list_at_most(fuzzer: Fuzzer<a>, max: Int) -> Fuzzer<List<a>>
      • list_between(fuzzer: Fuzzer<a>, min: Int, max: Int) -> Fuzzer<List<a>>
      • list_with_elem(fuzzer: Fuzzer<a>) -> Fuzzer<(List<a>, a)>
      • sublist(xs: List<a>) -> Fuzzer<List<a>>
    • Set

      • set(fuzzer: Fuzzer<a>) -> Fuzzer<List<a>>
      • set_at_least(fuzzer: Fuzzer<a>, min: Int) -> Fuzzer<List<a>>
      • set_at_most(fuzzer: Fuzzer<a>, max: Int) -> Fuzzer<List<a>>
      • set_between(fuzzer: Fuzzer<a>, min: Int, max: Int) -> Fuzzer<List<a>>
      • set_with_elem(fuzzer: Fuzzer<a>) -> Fuzzer<(List<a>, a)>
      • subset(xs: List<a>) -> Fuzzer<List<a>>
    • Combinators

      • one_of(xs: List<a>) -> Fuzzer<a>
      • either(left: Fuzzer<a>, right: Fuzzer<a>) -> Fuzzer<a>
      • both(left: Fuzzer<a>, right: Fuzzer<b>) -> Fuzzer<(a, b)>
      • such_that(fuzzer: Fuzzer<a>, predicate: fn(a) -> Bool) -> Fuzzer<a>
      • and_then(fuzz_a: Fuzzer<a>, f: fn(a) -> Fuzzer<b>) -> Fuzzer<b>
      • map(fuzz_a: Fuzzer<a>, f: fn(a) -> b) -> Fuzzer<b>
      • map2(fuzz_0: Fuzzer<t0>, fuzz_1: Fuzzer<t1>, f: fn(t0, t1) -> result) -> Fuzzer<result>
      • ...
      • map9(..) -> Fuzzer<result>