aboutsummaryrefslogtreecommitdiffstats
path: root/spec/cell_spec.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-02-28 12:21:57 +0000
committers-ol <s-ol@users.noreply.github.com>2020-02-28 21:01:19 +0000
commitdf8141c3214a5fb8d447297be64bdf5619b7d8a7 (patch)
treef401303d36724c1055e25e0aaef9e0a27107c8a1 /spec/cell_spec.moon
parentlots of fixes (diff)
downloadalive-df8141c3214a5fb8d447297be64bdf5619b7d8a7.tar.gz
alive-df8141c3214a5fb8d447297be64bdf5619b7d8a7.zip
doc and tag spec
Diffstat (limited to 'spec/cell_spec.moon')
-rw-r--r--spec/cell_spec.moon36
1 files changed, 0 insertions, 36 deletions
diff --git a/spec/cell_spec.moon b/spec/cell_spec.moon
deleted file mode 100644
index fcf9861..0000000
--- a/spec/cell_spec.moon
+++ /dev/null
@@ -1,36 +0,0 @@
-import Cell, RootCell, Value, Scope, globals from require 'core'
-import Registry from require 'core.registry'
-import Logger from require 'logger'
-Logger.init 'silent'
-
-hello_world = Cell nil, { (Value.sym 'hello'), (Value.str 'world') }
-two_plus_two = Cell nil, { (Value.sym '+'), (Value.num 2), (Value.num 2) }
-
-describe 'Cell', ->
- it 'supports quoting', ->
- with hello_world\quote!
- assert.is.equal Cell, .__class
- assert.is.equal (Value.sym 'hello'), \head!
- assert.is.same { Value.str 'world' }, \tail!
-
- with two_plus_two\quote!
- assert.is.equal Cell, .__class
- assert.is.equal (Value.sym '+'), \head!
- assert.is.same { (Value.num 2), (Value.num 2) }, \tail!
-
-
-describe 'RootCell', ->
- test 'head is always "do"', ->
- cell = RootCell\parse {}
- assert.is.equal (Value.sym 'do'), cell\head!
-
- cell = RootCell nil, { hello_world, two_plus_two }
- assert.is.equal (Value.sym 'do'), cell\head!
-
- test 'tail is all children', ->
- cell = RootCell\parse {}
- assert.is.same {}, cell\tail!
-
- cell = RootCell nil, { hello_world, two_plus_two }
- assert.is.same { hello_world, two_plus_two },
- cell\tail!