diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-05-10 14:25:09 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-05-10 14:37:22 +0000 |
| commit | 966eef2d6557eeffc5b5c7b379efc1f2e7d0de0b (patch) | |
| tree | 524d983750073d17a8adfed2c90550ebd0e0501f /spec/result | |
| parent | add and test Type:eq(a,b) (diff) | |
| download | alive-966eef2d6557eeffc5b5c7b379efc1f2e7d0de0b.tar.gz alive-966eef2d6557eeffc5b5c7b379efc1f2e7d0de0b.zip | |
make <num! 4> == <num= 4>
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 |
