diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-05-08 09:41:08 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:23:21 +0000 |
| commit | 99ca67938c0145db37182bdb709d9424a20dfee0 (patch) | |
| tree | 6df4e2b5fde650aa3c7e36893eb1780f932d56bd /spec/cell_spec.moon | |
| parent | release v0.1 (diff) | |
| download | alive-99ca67938c0145db37182bdb709d9424a20dfee0.tar.gz alive-99ca67938c0145db37182bdb709d9424a20dfee0.zip | |
wip new type system and refactoring
- Result -> RTNode
- Stream -> Result
- ValueStream -> SigStream
- EventStream -> EvtStream
Diffstat (limited to 'spec/cell_spec.moon')
| -rw-r--r-- | spec/cell_spec.moon | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/cell_spec.moon b/spec/cell_spec.moon index 0b2ff64..de46245 100644 --- a/spec/cell_spec.moon +++ b/spec/cell_spec.moon @@ -1,15 +1,15 @@ import do_setup from require 'spec.test_setup' import Cell, RootCell from require 'alv.cell' -import ValueStream, Scope, Tag, SimpleRegistry, globals from require 'alv' +import Constant, Scope, Tag, SimpleRegistry, globals from require 'alv' import Copilot from require 'alv.copilot' setup do_setup hello_world = Cell.parse Tag.parse('2'), { - '', (ValueStream.sym 'hello'), ' ', (ValueStream.str 'world'), '' + '', (Constant.sym 'hello'), ' ', (Constant.str 'world'), '' } two_plus_two = Cell.parse Tag.parse('3'), { - '', (ValueStream.sym '+'), ' ', (ValueStream.num 2), ' ', (ValueStream.num 2), '' + '', (Constant.sym '+'), ' ', (Constant.num 2), ' ', (Constant.num 2), '' } describe 'Cell', -> @@ -18,8 +18,8 @@ describe 'Cell', -> with hello_world\clone parent it 'keeps children', -> assert.is.equal Cell, .__class - assert.is.equal (ValueStream.sym 'hello'), \head! - assert.is.same { ValueStream.str 'world' }, \tail! + assert.is.equal (Constant.sym 'hello'), \head! + assert.is.same { Constant.str 'world' }, \tail! it 'clones the tag', -> assert.is.equal hello_world.tag, .tag.original @@ -31,8 +31,8 @@ describe 'Cell', -> assert.has.error -> cell\eval globals it 'evaluates its head', -> - head = ValueStream.sym 'trace' - cell = Cell.parse { '', head, ' ', (ValueStream.sym 'true'), '' } + head = Constant.sym 'trace' + cell = Cell.parse { '', head, ' ', (Constant.sym 'true'), '' } s = spy.on head, 'eval' cell\eval globals @@ -45,10 +45,10 @@ describe 'RootCell', -> test 'head is always "do"', -> cell = Cell.parse_root {} - assert.is.equal (ValueStream.sym 'do'), cell\head! + assert.is.equal (Constant.sym 'do'), cell\head! cell = RootCell nil, { hello_world, two_plus_two } - assert.is.equal (ValueStream.sym 'do'), cell\head! + assert.is.equal (Constant.sym 'do'), cell\head! test 'tail is all children', -> cell = Cell.parse_root {} |
