From 942c2a5811798d6c6bbb66c17b3578cda84a565c Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 18 Mar 2025 13:16:24 +0100 Subject: lib: unary math/+, math/* --- spec/lib/math_spec.moon | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'spec/lib') diff --git a/spec/lib/math_spec.moon b/spec/lib/math_spec.moon index 40c7abd..038fc5a 100644 --- a/spec/lib/math_spec.moon +++ b/spec/lib/math_spec.moon @@ -153,6 +153,19 @@ describe "math", -> (- [[1 2] [1 2]] [1 2])' + describe "add, sub, mul", -> + it "handle single arguments", -> + COPILOT\eval_once ' + (expect= [3 4 5] + (+ [3 4 5])) + + (expect= [0 1 -2] + (- [0 -1 2])) + + (expect= [1 2 3] + (* [1 2 3])) + ' + describe "mul", -> it "handles scalars and matrices", -> with COPILOT\eval_once ' -- cgit v1.2.3