aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/test/test/lux.lux10
-rw-r--r--stdlib/test/test/lux/macro/template.lux27
-rw-r--r--stdlib/test/tests.lux9
3 files changed, 14 insertions, 32 deletions
diff --git a/stdlib/test/test/lux.lux b/stdlib/test/test/lux.lux
index 1085a1376..5b530ba98 100644
--- a/stdlib/test/test/lux.lux
+++ b/stdlib/test/test/lux.lux
@@ -172,3 +172,13 @@
(is "lol" (default "yolo"
(#;Some "lol")))))
))
+
+(template: (hypotenuse x y)
+ (i.+ (i.* x x) (i.* y y)))
+
+(test: "Templates"
+ [x R;int
+ y R;int]
+ (assert "Template application is a stand-in for the templated code."
+ (i.= (i.+ (i.* x x) (i.* y y))
+ (hypotenuse x y))))
diff --git a/stdlib/test/test/lux/macro/template.lux b/stdlib/test/test/lux/macro/template.lux
deleted file mode 100644
index 4ff5e683f..000000000
--- a/stdlib/test/test/lux/macro/template.lux
+++ /dev/null
@@ -1,27 +0,0 @@
-## Copyright (c) Eduardo Julian. All rights reserved.
-## This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-## If a copy of the MPL was not distributed with this file,
-## You can obtain one at http://mozilla.org/MPL/2.0/.
-
-(;module:
- lux
- (lux (codata [io])
- (control monad)
- (data text/format
- [error #- fail])
- (math ["R" random])
- pipe
- [compiler]
- (macro ["s" syntax]
- ["&" template #+ template:]))
- lux/test)
-
-(template: (hypotenuse x y)
- (i.+ (i.* x x) (i.* y y)))
-
-(test: "Templates"
- [x R;int
- y R;int]
- (assert "Template application is a stand-in for the templated code."
- (i.= (i.+ (i.* x x) (i.* y y))
- (hypotenuse x y))))
diff --git a/stdlib/test/tests.lux b/stdlib/test/tests.lux
index 9e7c1c246..c57ca61c5 100644
--- a/stdlib/test/tests.lux
+++ b/stdlib/test/tests.lux
@@ -48,19 +48,18 @@
[set]
[stack]
[tree]
- [vector]
+ ## [vector]
[zipper])
- (text [format]))
+ (text [format])
+ )
["_;" math]
(math ["_;" ratio]
["_;" complex]
## ["_;" random]
- ["_;" simple]
- )
+ ["_;" simple])
## ["_;" macro]
(macro ["_;" ast]
["_;" syntax]
- ["_;" template]
(poly ["poly_;" eq]
["poly_;" text-encoder]
["poly_;" functor]))