Skip to content

Commit

Permalink
Update new ponycheck addition
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Feb 24, 2022
1 parent db97e9f commit 71e63f5
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion examples/pony_check/async_tcp_property.pony
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use "itertools"
use "net"
use "pony_check"
use "ponytest"
use "pony_test"

class _TCPSenderConnectionNotify is TCPConnectionNotify
let _message: String
Expand Down
2 changes: 1 addition & 1 deletion examples/pony_check/list_reverse.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "pony_check"


Expand Down
2 changes: 1 addition & 1 deletion examples/pony_check/main.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "pony_check"

actor Main is TestList
Expand Down
2 changes: 1 addition & 1 deletion packages/pony_check/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

use "collections"
use "itertools"
Expand Down
2 changes: 1 addition & 1 deletion packages/pony_check/for_all.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

class ForAll[T]
let _gen: Generator[T] val
Expand Down
12 changes: 6 additions & 6 deletions packages/pony_check/pony_check.pony
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ A property based test in PonyCheck consists of the following:
* A `property` method that asserts a certain property for each sample
generated by the [Generator(s)](pony_check-Generator.md) with the help of
[PropertyHelper](pony_check-PropertyHelper.md), which tries to expose a
similar API as [TestHelper](ponytest-TestHelper.md).
similar API as [TestHelper](pony_test-TestHelper.md).
* Optionally, the method `params()` can be used to configure how PonyCheck
executes the property by specifying a custom
[PropertyParams](pony_check-PropertyParams.md) object.
Expand All @@ -56,7 +56,7 @@ class ListReverseProperty is Property1[List[USize]]
## Integration into PonyTest
There are two ways of integrating a [Property](pony_check-Property1.md) into
[PonyTest](ponytest--index.md):
[PonyTest](pony_test--index.md):
1. In order to pass your Property to the PonyTest engine, you need to wrap it
inside a [Property1UnitTest](pony_check-Property1UnitTest.md).
Expand All @@ -70,9 +70,9 @@ There are two ways of integrating a [Property](pony_check-Property1.md) into
```
2. Run as many [Properties](pony_check-Property1.md) as you wish inside one
PonyTest [UnitTest](ponytest-UnitTest.md) using the convenience function
PonyTest [UnitTest](pony_test-UnitTest.md) using the convenience function
[PonyCheck.for_all](pony_check-PonyCheck.md#for_all) providing a
[Generator](pony_check-Generator), the [TestHelper](ponytest-TestHelper.md)
[Generator](pony_check-Generator), the [TestHelper](pony_test-TestHelper.md)
and the actual property function. (Note that the property function is supplied
in a second application of the result to `for_all`.)
Expand All @@ -89,7 +89,7 @@ There are two ways of integrating a [Property](pony_check-Property1.md) into
// ... possibly more properties, using `PonyCheck.for_all`
```
Independently of how you integrate with [PonyTest](ponytest--index.md),
Independently of how you integrate with [PonyTest](pony_test--index.md),
the PonyCheck machinery will instantiate the provided Generator, and will
execute it for a configurable number of samples.
Expand All @@ -100,7 +100,7 @@ to obtain a smaller and more informative, still failing, sample
for reporting.
"""
use "ponytest"
use "pony_test"

primitive PonyCheck
fun for_all[T](gen: Generator[T] val, h: TestHelper): ForAll[T] =>
Expand Down
2 changes: 1 addition & 1 deletion packages/pony_check/property.pony
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ trait Property1[T]
The smallest shrunken sample will then be reported to the user.
A [Property1](pony_check-Property1.md) can be run with
[Ponytest](ponytest--index.md).
[Ponytest](pony_test--index.md).
To that end it needs to be wrapped into a
[Property1UnitTest](pony_check-Property1UnitTest.md).
"""
Expand Down
2 changes: 1 addition & 1 deletion packages/pony_check/property_helper.pony
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class val PropertyHelper
"""
Helper for PonyCheck properties.
Mirrors the [TestHelper](ponytest-TestHelper.md) API as closely as possible.
Mirrors the [TestHelper](pony_test-TestHelper.md) API as closely as possible.
Contains assertion functions and functions for completing asynchronous
properties, for expecting and completing or failing actions.
Expand Down
10 changes: 5 additions & 5 deletions packages/pony_check/property_unit_test.pony
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use "ponytest"
use "pony_test"

class iso Property1UnitTest[T] is UnitTest
"""
Provides plumbing for integration of PonyCheck
[Properties](pony_check-Property1.md) into [PonyTest](ponytest--index.md).
[Properties](pony_check-Property1.md) into [PonyTest](pony_test--index.md).
Wrap your properties into this class and use it in a
[TestList](ponytest-TestList.md):
[TestList](pony_test-TestList.md):
```pony
use "ponytest"
use "pony_test"
use "pony_check"
class MyProperty is Property1[String]
Expand All @@ -36,7 +36,7 @@ class iso Property1UnitTest[T] is UnitTest
new iso create(p1: Property1[T] iso, name': (String | None) = None) =>
"""
Wrap a [Property1](pony_check-Property1.md) to make it mimic the PonyTest
[UnitTest](ponytest-UnitTest.md).
[UnitTest](pony_test-UnitTest.md).
If `name'` is given, use this as the test name.
If not, use the property's `name()`.
Expand Down

0 comments on commit 71e63f5

Please sign in to comment.