Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

0.5.0

Compare
Choose a tag to compare
@mfelsche mfelsche released this 07 Mar 15:06

Breaking

Property1 and all other Property classes got their property method changed from fun box to fun ref. The idea behind i is that you can access and mutate state within your property class now (e.g. increase a counter or whatever).

Added

  • We now have classes Property2, Property3 and Property4 if you want to generate multiple values for your property. Example:
class SuccessfulProperty2 is Property2[U8, U8]
  fun name(): String => "2-element-property"
  fun gen1(): Generator[U8] => Generators.u8(0, 1)
  fun gen2(): Generator[U8] => Generators.u8(2, 3)

  fun ref property2(arg1: U8, arg2: U8, h: PropertyHelper) =>
    h.assert_true((arg1 + arg2) >= arg1)
    h.assert_true((arg1 + arg2) >= arg2)