aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/lux/abstract/apply.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-04-09 03:03:46 -0400
committerEduardo Julian2022-04-09 03:03:46 -0400
commit04c7f49a732380a2b9f72b1b937171b341c24323 (patch)
treed54c92bf10665bba0ec4643746becce569604fb2 /stdlib/source/specification/lux/abstract/apply.lux
parentf11afb9d2dfe2d59b41e8056eb8c4ae65268415f (diff)
Better names for testing macros (plus better indentation).
Diffstat (limited to 'stdlib/source/specification/lux/abstract/apply.lux')
-rw-r--r--stdlib/source/specification/lux/abstract/apply.lux46
1 files changed, 23 insertions, 23 deletions
diff --git a/stdlib/source/specification/lux/abstract/apply.lux b/stdlib/source/specification/lux/abstract/apply.lux
index 461f304c3..3266925ce 100644
--- a/stdlib/source/specification/lux/abstract/apply.lux
+++ b/stdlib/source/specification/lux/abstract/apply.lux
@@ -20,31 +20,31 @@
(All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test))
(do [! random.monad]
[sample (# ! each injection random.nat)]
- (_.test "Identity."
- ((comparison n.=)
- (/#on sample (injection function.identity))
- sample))))
+ (_.property "Identity."
+ ((comparison n.=)
+ (/#on sample (injection function.identity))
+ sample))))
(def: (homomorphism injection comparison (open "/#[0]"))
(All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test))
(do [! random.monad]
[sample random.nat
increase (# ! each n.+ random.nat)]
- (_.test "Homomorphism."
- ((comparison n.=)
- (/#on (injection sample) (injection increase))
- (injection (increase sample))))))
+ (_.property "Homomorphism."
+ ((comparison n.=)
+ (/#on (injection sample) (injection increase))
+ (injection (increase sample))))))
(def: (interchange injection comparison (open "/#[0]"))
(All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test))
(do [! random.monad]
[sample random.nat
increase (# ! each n.+ random.nat)]
- (_.test "Interchange."
- ((comparison n.=)
- (/#on (injection sample) (injection increase))
- (/#on (injection increase) (injection (is (-> (-> Nat Nat) Nat)
- (function (_ f) (f sample)))))))))
+ (_.property "Interchange."
+ ((comparison n.=)
+ (/#on (injection sample) (injection increase))
+ (/#on (injection increase) (injection (is (-> (-> Nat Nat) Nat)
+ (function (_ f) (f sample)))))))))
(def: (composition injection comparison (open "/#[0]"))
(All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test))
@@ -55,16 +55,16 @@
(# ! each n.+ random.nat))
decrease (is (Random :$/1:)
(# ! each n.- random.nat))]
- (_.test "Composition."
- ((comparison n.=)
- (|> (injection (is (-> :$/1: :$/1: :$/1:)
- function.composite))
- (/#on (injection increase))
- (/#on (injection decrease))
- (/#on (injection sample)))
- (/#on (/#on (injection sample)
- (injection increase))
- (injection decrease)))))))
+ (_.property "Composition."
+ ((comparison n.=)
+ (|> (injection (is (-> :$/1: :$/1: :$/1:)
+ function.composite))
+ (/#on (injection increase))
+ (/#on (injection decrease))
+ (/#on (injection sample)))
+ (/#on (/#on (injection sample)
+ (injection increase))
+ (injection decrease)))))))
(def: .public (spec injection comparison apply)
(All (_ f) (-> (Injection f) (Comparison f) (Apply f) Test))