diff options
| author | s-ol <s+removethis@s-ol.nu> | 2025-03-18 12:16:24 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-18 12:16:24 +0000 |
| commit | 942c2a5811798d6c6bbb66c17b3578cda84a565c (patch) | |
| tree | 3f45eb54eab9623548bf3afa8240ce66bdfc435d /spec | |
| parent | language: [array] and {struct} literals (diff) | |
| download | alive-942c2a5811798d6c6bbb66c17b3578cda84a565c.tar.gz alive-942c2a5811798d6c6bbb66c17b3578cda84a565c.zip | |
lib: unary math/+, math/*
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/lib/math_spec.moon | 13 |
1 files changed, 13 insertions, 0 deletions
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 ' |
