aboutsummaryrefslogtreecommitdiffstats
path: root/spec/result
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-05-10 14:25:09 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-02 14:23:21 +0000
commitd36259f60b3e6f6077710905d5f7fcfd9f1710fc (patch)
treeec6975f00af35b0faf83f8c20b7ad0eab6e7ae7f /spec/result
parentadd and test Type:eq(a,b) (diff)
downloadalive-d36259f60b3e6f6077710905d5f7fcfd9f1710fc.tar.gz
alive-d36259f60b3e6f6077710905d5f7fcfd9f1710fc.zip
make <num! 4> == <num= 4>
Diffstat (limited to 'spec/result')
-rw-r--r--spec/result/sig_spec.moon11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/result/sig_spec.moon b/spec/result/sig_spec.moon
index 4d04b9c..6e9a11c 100644
--- a/spec/result/sig_spec.moon
+++ b/spec/result/sig_spec.moon
@@ -1,5 +1,5 @@
import do_setup from require 'spec.test_setup'
-import SigStream, RTNode, Scope, SimpleRegistry, T from require 'alv'
+import SigStream, Constant, RTNode, Scope, SimpleRegistry, T from require 'alv'
import Op, Builtin from require 'alv.base'
class TestOp extends Op
@@ -51,6 +51,15 @@ describe 'SigStream', ->
assert.is.equal (SigStream T.num, 3), val
assert.not.equal (SigStream T.num, 4), val
+ it 'can be compared to a Constant', ->
+ val = SigStream T.num, 3
+ assert.is.equal (Constant.num 3), val
+ assert.not.equal (Constant.num 4), val
+
+ val = SigStream T.str, 'hello'
+ assert.is.equal (Constant.str 'hello'), val
+ assert.not.equal (Constant.sym 'hello'), val
+
describe ':set', ->
it 'sets the value', ->
val = SigStream T.num, 3