diff options
Diffstat (limited to 'spec/result')
| -rw-r--r-- | spec/result/sig_spec.moon | 11 |
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 |
