Skip to content

Commit 6044df6

Browse files
Improve the zero laws
1 parent ad5f979 commit 6044df6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

AquiferTests/ProxyTests.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,15 @@ class ProxySpec : XCTestCase {
5454
formulate({ $0.reflect() } { request($0) }, { respond($0) })(s, c)
5555
}
5656

57-
property("Request Zero Law") <- forAll { (p2 : AProxy, s : AServer, c : AClient) in
57+
property("Request Right Zero Law") <- forAll { (p2 : AProxy, s : AServer, c : AClient) in
5858
let p = aProxy(p2)
5959
return formulate(p >|> Proxy.pure, Proxy.pure)(s, c)
6060
}
61+
62+
property("Respond Left Zero Law") <- forAll { (p2 : AProxy, s : AServer, c : AClient) in
63+
let p = aProxy(p2)
64+
return formulate(Proxy.pure |>| p, Proxy.pure)(s, c)
65+
}
6166

6267
property("Push-Pull respect associativity") <- forAll { (f2 : AProxy, g2 : AProxy, h2 : AProxy, s : AServer, c : AClient) in
6368
let f = aProxy(f2)

0 commit comments

Comments
 (0)