Property1UnitTest[T: T]¶
Provides plumbing for integration of PonyCheck Properties into PonyTest.
Wrap your properties into this class and use it in a TestList:
use "pony_test"
use "pony_check"
class MyProperty is Property1[String]
fun name(): String => "my_property"
fun gen(): Generator[String] =>
Generators.ascii_printable()
fun property(arg1: String, h: PropertyHelper) =>
h.assert_true(arg1.size() > 0)
actor Main is TestList
new create(env: Env) => PonyTest(env, this)
fun tag tests(test: PonyTest) =>
test(Property1UnitTest[String](MyProperty))
Implements¶
- UnitTest ref
Constructors¶
create¶
Wrap a Property1 to make it mimic the PonyTest UnitTest.
If name'
is given, use this as the test name.
If not, use the property's name()
.
new iso create(
p1: Property1[T] iso,
name': (String val | None val) = reference)
: Property1UnitTest[T] iso^
Parameters¶
Returns¶
- Property1UnitTest[T] iso^
Public Functions¶
name¶
Returns¶
- String val
apply¶
Parameters¶
- h: TestHelper val
Returns¶
- None val ?
exclusion_group¶
Returns¶
- String val
timed_out¶
Parameters¶
- h: TestHelper val
Returns¶
- None val
set_up¶
Parameters¶
- h: TestHelper val
Returns¶
- None val ?
tear_down¶
Parameters¶
- h: TestHelper val
Returns¶
- None val
label¶
Returns¶
- String val