diff options
Diffstat (limited to 'stdlib/test/test/lux.lux')
-rw-r--r-- | stdlib/test/test/lux.lux | 10 |
1 files changed, 10 insertions, 0 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)))) |