aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux.lux12
-rw-r--r--stdlib/source/test/lux/compiler/default/phase/analysis/primitive.lux4
-rw-r--r--stdlib/source/test/lux/compiler/default/phase/analysis/procedure/common.lux2
-rw-r--r--stdlib/source/test/lux/compiler/default/phase/analysis/reference.lux2
-rw-r--r--stdlib/source/test/lux/compiler/default/phase/analysis/structure.lux2
-rw-r--r--stdlib/source/test/lux/compiler/default/phase/synthesis/primitive.lux2
-rw-r--r--stdlib/source/test/lux/control/interval.lux2
-rw-r--r--stdlib/source/test/lux/control/region.lux4
-rw-r--r--stdlib/source/test/lux/data/color.lux2
-rw-r--r--stdlib/source/test/lux/data/number/frac.lux4
-rw-r--r--stdlib/source/test/lux/data/number/int.lux4
-rw-r--r--stdlib/source/test/lux/data/number/nat.lux4
-rw-r--r--stdlib/source/test/lux/data/number/ratio.lux2
-rw-r--r--stdlib/source/test/lux/data/number/rev.lux4
-rw-r--r--stdlib/source/test/lux/host.jvm.lux2
-rw-r--r--stdlib/source/test/lux/macro/code.lux2
-rw-r--r--stdlib/source/test/lux/macro/syntax.lux4
-rw-r--r--stdlib/source/test/lux/math/logic/fuzzy.lux4
-rw-r--r--stdlib/source/test/lux/type.lux4
19 files changed, 33 insertions, 33 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index f830f8215..4caf29c32 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -280,17 +280,17 @@
false))))
))
-(template: (hypotenuse cat0 cat1)
+(template: (quadrance cat0 cat1)
(n/+ (n/* cat0 cat0) (n/* cat1 cat1)))
-(def: template
+(def: templates
Test
(do r.monad
[cat0 r.nat
cat1 r.nat]
(_.test "Template application is a stand-in for the templated code."
(n/= (n/+ (n/* cat0 cat0) (n/* cat1 cat1))
- (hypotenuse cat0 cat1)))))
+ (quadrance cat0 cat1)))))
(def: cross-platform-support
Test
@@ -324,7 +324,7 @@
(..even-or-odd r.int i/even? i/odd?))))
(<| (_.context "Minimum and maximum.")
(`` ($_ _.and
- (~~ (do-template [<=> <lt> <min> <gt> <max> <gen> <context>]
+ (~~ (template [<=> <lt> <min> <gt> <max> <gen> <context>]
[(<| (_.context <context>)
(..minimum-and-maximum <gen> <=> [<lt> <min>] [<gt> <max>]))]
@@ -335,7 +335,7 @@
)))))
(<| (_.context "Conversion.")
(`` ($_ _.and
- (~~ (do-template [<=> <forward> <backward> <gen>]
+ (~~ (template [<=> <forward> <backward> <gen>]
[(<| (_.context (format (%name (name-of <forward>))
" " (%name (name-of <backward>))))
(..conversion <gen> <forward> <backward> <=>))]
@@ -349,7 +349,7 @@
(<| (_.context "Prelude macros.")
..prelude-macros)
(<| (_.context "Templates.")
- ..template)
+ ..templates)
(<| (_.context "Cross-platform support.")
..cross-platform-support)
/cli.test
diff --git a/stdlib/source/test/lux/compiler/default/phase/analysis/primitive.lux b/stdlib/source/test/lux/compiler/default/phase/analysis/primitive.lux
index 0c716dd3f..e60a7c40c 100644
--- a/stdlib/source/test/lux/compiler/default/phase/analysis/primitive.lux
+++ b/stdlib/source/test/lux/compiler/default/phase/analysis/primitive.lux
@@ -40,7 +40,7 @@
(def: #export primitive
(r.Random [Type Code])
(`` ($_ r.either
- (~~ (do-template [<type> <code-wrapper> <value-gen>]
+ (~~ (template [<type> <code-wrapper> <value-gen>]
[(r.and (r;wrap <type>) (r;map <code-wrapper> <value-gen>))]
[Any code.tuple (r.list 0 ..unit)]
@@ -80,7 +80,7 @@
#0)))
(<| (times 100)
(`` ($_ seq
- (~~ (do-template [<desc> <type> <tag> <random> <constructor>]
+ (~~ (template [<desc> <type> <tag> <random> <constructor>]
[(do @
[sample <random>]
(test (format "Can analyse " <desc> ".")
diff --git a/stdlib/source/test/lux/compiler/default/phase/analysis/procedure/common.lux b/stdlib/source/test/lux/compiler/default/phase/analysis/procedure/common.lux
index 7d83f00c8..8b5308a5d 100644
--- a/stdlib/source/test/lux/compiler/default/phase/analysis/procedure/common.lux
+++ b/stdlib/source/test/lux/compiler/default/phase/analysis/procedure/common.lux
@@ -29,7 +29,7 @@
[///
["_." primitive]])
-(do-template [<name> <success> <failure>]
+(template [<name> <success> <failure>]
[(def: (<name> procedure params output-type)
(-> Text (List Code) Type Bit)
(|> (scope.with-scope ""
diff --git a/stdlib/source/test/lux/compiler/default/phase/analysis/reference.lux b/stdlib/source/test/lux/compiler/default/phase/analysis/reference.lux
index 4cf1f9da0..a73e6c3cb 100644
--- a/stdlib/source/test/lux/compiler/default/phase/analysis/reference.lux
+++ b/stdlib/source/test/lux/compiler/default/phase/analysis/reference.lux
@@ -30,7 +30,7 @@
(type: Check (-> (Error Any) Bit))
-(do-template [<name> <on-success> <on-failure>]
+(template [<name> <on-success> <on-failure>]
[(def: <name>
Check
(|>> (case> (#error.Success _)
diff --git a/stdlib/source/test/lux/compiler/default/phase/analysis/structure.lux b/stdlib/source/test/lux/compiler/default/phase/analysis/structure.lux
index 6d575fd08..186c961e9 100644
--- a/stdlib/source/test/lux/compiler/default/phase/analysis/structure.lux
+++ b/stdlib/source/test/lux/compiler/default/phase/analysis/structure.lux
@@ -33,7 +33,7 @@
[//
["_." primitive]])
-(do-template [<name> <on-success> <on-error>]
+(template [<name> <on-success> <on-error>]
[(def: #export <name>
(All [a] (-> (Operation a) Bit))
(|>> (phase.run _primitive.state)
diff --git a/stdlib/source/test/lux/compiler/default/phase/synthesis/primitive.lux b/stdlib/source/test/lux/compiler/default/phase/synthesis/primitive.lux
index 87dccc9f5..d6bb57789 100644
--- a/stdlib/source/test/lux/compiler/default/phase/synthesis/primitive.lux
+++ b/stdlib/source/test/lux/compiler/default/phase/synthesis/primitive.lux
@@ -77,7 +77,7 @@
|frac| r.frac
|text| (r.unicode 5)]
(`` ($_ seq
- (~~ (do-template [<desc> <analysis> <synthesis> <sample>]
+ (~~ (template [<desc> <analysis> <synthesis> <sample>]
[(test (format "Can synthesize " <desc> ".")
(|> (#analysis.Primitive (<analysis> <sample>))
expression.phase
diff --git a/stdlib/source/test/lux/control/interval.lux b/stdlib/source/test/lux/control/interval.lux
index a32333ba1..7502f88bc 100644
--- a/stdlib/source/test/lux/control/interval.lux
+++ b/stdlib/source/test/lux/control/interval.lux
@@ -22,7 +22,7 @@
[control
["$." equivalence]]]]})
-(do-template [<name> <cmp>]
+(template [<name> <cmp>]
[(def: #export <name>
(Random (Interval Nat))
(do r.monad
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index 091506613..cca103eac 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -18,7 +18,7 @@
(exception: oops)
-(do-template [<name> <success> <error>]
+(template [<name> <success> <error>]
[(def: (<name> result)
(All [a] (-> (Error a) Bit))
(case result
@@ -34,7 +34,7 @@
(def: #export test
Test
- (<| (_.context (%name (name-of /.Region)))
+ (<| (_.context (%name (name-of /._)))
(do r.monad
[expected-clean-ups (|> r.nat (:: @ map (|>> (n/% 100) (n/max 1))))]
($_ _.and
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index ed69ddf7c..f3db0c6f7 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -40,7 +40,7 @@
(def: black (/.from-rgb [0 0 0]))
(def: white (/.from-rgb [255 255 255]))
-(do-template [<field>]
+(template [<field>]
[(def: (<field> color)
(-> Color Frac)
(let [[hue saturation luminance] (/.to-hsl color)]
diff --git a/stdlib/source/test/lux/data/number/frac.lux b/stdlib/source/test/lux/data/number/frac.lux
index 87b937a93..89ff72749 100644
--- a/stdlib/source/test/lux/data/number/frac.lux
+++ b/stdlib/source/test/lux/data/number/frac.lux
@@ -25,14 +25,14 @@
($equivalence.spec /.equivalence gen-frac)
($order.spec /.order gen-frac)
($number.spec /.order /.number gen-frac)
- (~~ (do-template [<monoid>]
+ (~~ (template [<monoid>]
[(<| (_.context (%name (name-of <monoid>)))
($monoid.spec /.equivalence <monoid> gen-frac))]
[/.addition] [/.multiplication] [/.minimum] [/.maximum]
))
## TODO: Uncomment ASAP
- ## (~~ (do-template [<codec>]
+ ## (~~ (template [<codec>]
## [(<| (_.context (%name (name-of /.binary)))
## ($codec.spec /.equivalence <codec> gen-frac))]
diff --git a/stdlib/source/test/lux/data/number/int.lux b/stdlib/source/test/lux/data/number/int.lux
index b9ed4f856..e11685580 100644
--- a/stdlib/source/test/lux/data/number/int.lux
+++ b/stdlib/source/test/lux/data/number/int.lux
@@ -28,13 +28,13 @@
($number.spec /.order /.number (:: r.monad map (i/% +1,000,000) r.int))
($enum.spec /.enum r.int)
($interval.spec /.interval r.int)
- (~~ (do-template [<monoid>]
+ (~~ (template [<monoid>]
[(<| (_.context (%name (name-of <monoid>)))
($monoid.spec /.equivalence <monoid> r.int))]
[/.addition] [/.multiplication] [/.minimum] [/.maximum]
))
- (~~ (do-template [<codec>]
+ (~~ (template [<codec>]
[(<| (_.context (%name (name-of /.binary)))
($codec.spec /.equivalence <codec> r.int))]
diff --git a/stdlib/source/test/lux/data/number/nat.lux b/stdlib/source/test/lux/data/number/nat.lux
index 17ee0503b..9616e9bd6 100644
--- a/stdlib/source/test/lux/data/number/nat.lux
+++ b/stdlib/source/test/lux/data/number/nat.lux
@@ -28,13 +28,13 @@
($number.spec /.order /.number (:: r.monad map (n/% 1,000,000) r.nat))
($enum.spec /.enum r.nat)
($interval.spec /.interval r.nat)
- (~~ (do-template [<monoid>]
+ (~~ (template [<monoid>]
[(<| (_.context (%name (name-of <monoid>)))
($monoid.spec /.equivalence <monoid> r.nat))]
[/.addition] [/.multiplication] [/.minimum] [/.maximum]
))
- (~~ (do-template [<codec>]
+ (~~ (template [<codec>]
[(<| (_.context (%name (name-of /.binary)))
($codec.spec /.equivalence <codec> r.nat))]
diff --git a/stdlib/source/test/lux/data/number/ratio.lux b/stdlib/source/test/lux/data/number/ratio.lux
index 5b74956c4..c3c67c317 100644
--- a/stdlib/source/test/lux/data/number/ratio.lux
+++ b/stdlib/source/test/lux/data/number/ratio.lux
@@ -34,7 +34,7 @@
($equivalence.spec /.equivalence ..ratio)
($order.spec /.order ..ratio)
($number.spec /.order /.number ..ratio)
- (~~ (do-template [<monoid>]
+ (~~ (template [<monoid>]
[(<| (_.context (%name (name-of <monoid>)))
($monoid.spec /.equivalence <monoid> ..ratio))]
diff --git a/stdlib/source/test/lux/data/number/rev.lux b/stdlib/source/test/lux/data/number/rev.lux
index dba639ae9..15b98ffe6 100644
--- a/stdlib/source/test/lux/data/number/rev.lux
+++ b/stdlib/source/test/lux/data/number/rev.lux
@@ -31,13 +31,13 @@
($order.spec /.order r.rev)
($enum.spec /.enum r.rev)
($interval.spec /.interval r.rev)
- (~~ (do-template [<monoid>]
+ (~~ (template [<monoid>]
[(<| (_.context (%name (name-of <monoid>)))
($monoid.spec /.equivalence <monoid> r.rev))]
[/.addition] [/.minimum] [/.maximum]
))
- (~~ (do-template [<codec>]
+ (~~ (template [<codec>]
[(<| (_.context (%name (name-of /.binary)))
($codec.spec /.equivalence <codec> r.rev))]
diff --git a/stdlib/source/test/lux/host.jvm.lux b/stdlib/source/test/lux/host.jvm.lux
index 20530d923..9bd0f5399 100644
--- a/stdlib/source/test/lux/host.jvm.lux
+++ b/stdlib/source/test/lux/host.jvm.lux
@@ -64,7 +64,7 @@
(do r.monad
[sample r.int]
(`` ($_ _.and
- (~~ (do-template [<to> <from> <message>]
+ (~~ (template [<to> <from> <message>]
[(_.test <message>
(or (|> sample <to> <from> (i/= sample))
(let [capped-sample (|> sample <to> <from>)]
diff --git a/stdlib/source/test/lux/macro/code.lux b/stdlib/source/test/lux/macro/code.lux
index 5ec12e6e2..c400bf206 100644
--- a/stdlib/source/test/lux/macro/code.lux
+++ b/stdlib/source/test/lux/macro/code.lux
@@ -29,7 +29,7 @@
module (r.ascii/alpha 10)
#let [name [module short]]]
(`` ($_ _.and
- (~~ (do-template [<desc> <code> <text>]
+ (~~ (template [<desc> <code> <text>]
[(let [code <code>]
(_.test (format "Can produce " <desc> " code node.")
(and (text@= <text> (/.to-text code))
diff --git a/stdlib/source/test/lux/macro/syntax.lux b/stdlib/source/test/lux/macro/syntax.lux
index e9f0428a1..60dd38b6e 100644
--- a/stdlib/source/test/lux/macro/syntax.lux
+++ b/stdlib/source/test/lux/macro/syntax.lux
@@ -69,7 +69,7 @@
(def: simple-values
Test
(`` ($_ _.and
- (~~ (do-template [<assertion> <value> <ctor> <Equivalence> <get>]
+ (~~ (template [<assertion> <value> <ctor> <Equivalence> <get>]
[(_.test <assertion>
(and (equals? <Equivalence> <value> <get> (list (<ctor> <value>)))
(found? (/.this? (<ctor> <value>)) (list (<ctor> <value>)))
@@ -101,7 +101,7 @@
(def: complex-values
Test
(`` ($_ _.and
- (~~ (do-template [<type> <parser> <ctor>]
+ (~~ (template [<type> <parser> <ctor>]
[(_.test (format "Can parse " <type> " syntax.")
(and (match [#1 +123]
(p.run (list (<ctor> (list (code.bit #1) (code.int +123))))
diff --git a/stdlib/source/test/lux/math/logic/fuzzy.lux b/stdlib/source/test/lux/math/logic/fuzzy.lux
index c74540bd9..e75268bf0 100644
--- a/stdlib/source/test/lux/math/logic/fuzzy.lux
+++ b/stdlib/source/test/lux/math/logic/fuzzy.lux
@@ -17,7 +17,7 @@
[//
["//" continuous]]]})
-(do-template [<name> <desc> <hash> <gen> <triangle> <lt> <lte> <gt> <gte>]
+(template [<name> <desc> <hash> <gen> <triangle> <lt> <lte> <gt> <gte>]
[(def: <name>
Test
(<| (_.context (%name (name-of <triangle>)))
@@ -56,7 +56,7 @@
[rev-triangles "Rev" rev.hash r.rev /.triangle r/< r/<= r/> r/>=]
)
-(do-template [<name> <desc> <hash> <gen> <trapezoid> <lt> <lte> <gt> <gte>]
+(template [<name> <desc> <hash> <gen> <trapezoid> <lt> <lte> <gt> <gte>]
[(def: <name>
Test
(<| (_.context (%name (name-of <trapezoid>)))
diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux
index 1fcc7e3e9..96478b077 100644
--- a/stdlib/source/test/lux/type.lux
+++ b/stdlib/source/test/lux/type.lux
@@ -96,7 +96,7 @@
#let [(^open "/@.") /.equivalence
(^open "list@.") (list.equivalence /.equivalence)]]
(`` ($_ _.and
- (~~ (do-template [<desc> <ctor> <dtor> <unit>]
+ (~~ (template [<desc> <ctor> <dtor> <unit>]
[(_.test (format "Can build and tear-down " <desc> " types.")
(let [flat (|> members <ctor> <dtor>)]
(or (list@= members flat)
@@ -142,7 +142,7 @@
#1))))
#let [(^open "/@.") /.equivalence]]
(`` ($_ _.and
- (~~ (do-template [<desc> <ctor> <dtor>]
+ (~~ (template [<desc> <ctor> <dtor>]
[(_.test (format "Can build and tear-down " <desc> " types.")
(let [[flat-size flat-body] (|> extra (<ctor> size) <dtor>)]
(and (n/= size flat-size)