Slide 23
Slide 23 text
What values will fast-check Arbitraries generate?
23
fc.integer() => -1000, -10, …, 0, 1, 3, …, 100, …
fc.webUrl() => "https://lo.ui", "https://4.xlm", …
fc.oneof(fc.nat(), fc.char()) => Use one of the given arbitraries
fc.record({ age: fc.nat(), name: fc.string() }) => Arbitrary for
given object model, e.g. { age: 2, name: "John" }
fc.boolean() => true, false
fc.nat() => 0, 1, 2, …, 100000, …
fc.string() => "", "C0SCup", "p#@91-+", …
.filter() => precondition for the arbitrary (e.g. n < 100)
fc.array(fc.nat()) => [], [1], [0,2,2,3], …, [3,5, …, 10,100]
fc.option(fc.nat()) => null, 0, 1, …, 100, …, 100000, …