aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib/logic_spec.moon
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2025-03-18 11:47:22 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-18 12:06:18 +0000
commitb6cbc69461dc054019f50f8971704f6ef9de63ab (patch)
treed2b8942b780f668ccbe57b52dd8d65f61613e935 /spec/lib/logic_spec.moon
parentbuiltins: switch takes single array as value (diff)
downloadalive-wip.tar.gz
alive-wip.zip
language: [array] and {struct} literalswip
Diffstat (limited to 'spec/lib/logic_spec.moon')
-rw-r--r--spec/lib/logic_spec.moon56
1 files changed, 28 insertions, 28 deletions
diff --git a/spec/lib/logic_spec.moon b/spec/lib/logic_spec.moon
index 2760e54..5b71465 100644
--- a/spec/lib/logic_spec.moon
+++ b/spec/lib/logic_spec.moon
@@ -9,25 +9,25 @@ describe "logic", ->
(expect= false (== 1 2))
(expect= false (== 1 "hello"))
(expect= true (== "hello" "hello"))
- (expect= true (== (array 1 2 3) (array 1 2 3)))
- (expect= false (== (array 1 2 3) (array 1 2 1)))
- (expect= false (== (array 1 2 3) (array 1 2)))
- (expect= false (== (array 1 2 3) (array 1 2 3 4)))
+ (expect= true (== [1 2 3] [1 2 3]))
+ (expect= false (== [1 2 3] [1 2 1]))
+ (expect= false (== [1 2 3] [1 2]))
+ (expect= false (== [1 2 3] [1 2 3 4]))
(expect= true (==
- (struct "a" 1 "b" true "c" (array "test"))
- (struct "a" 1 "b" true "c" (array "test"))))
+ {"a" 1 "b" true "c" ["test"]}
+ {"a" 1 "b" true "c" ["test"]}))
(expect= false (==
- (struct "a" 1 "b" false "c" (array "test"))
- (struct "a" 1 "b" true "c" (array "test"))))
+ {"a" 1 "b" false "c" ["test"]}
+ {"a" 1 "b" true "c" ["test"]}))
(expect= false (==
- (struct "a" 1 "b" true "c" (array "test" "toast"))
- (struct "a" 1 "b" true "c" (array "test"))))
+ {"a" 1 "b" true "c" ["test" "toast"]}
+ {"a" 1 "b" true "c" ["test"]}))
(expect= false (==
- (struct "a" 1 "b" true)
- (struct "a" 1 "b" true "c" (array "test"))))
+ {"a" 1 "b" true}
+ {"a" 1 "b" true "c" ["test"]}))
(expect= false (==
- (struct "a" 1 "b" true)
- (struct "a" 1)))
+ {"a" 1 "b" true}
+ {"a" 1}))
(expect= true (== print print))
(expect= false (== print ==))
'
@@ -42,25 +42,25 @@ describe "logic", ->
(expect= true (!= 1 2))
(expect= true (!= 1 "hello"))
(expect= false (!= "hello" "hello"))
- (expect= false (!= (array 1 2 3) (array 1 2 3)))
- (expect= true (!= (array 1 2 3) (array 1 2 1)))
- (expect= true (!= (array 1 2 3) (array 1 2)))
- (expect= true (!= (array 1 2 3) (array 1 2 3 4)))
+ (expect= false (!= [1 2 3] [1 2 3]))
+ (expect= true (!= [1 2 3] [1 2 1]))
+ (expect= true (!= [1 2 3] [1 2]))
+ (expect= true (!= [1 2 3] [1 2 3 4]))
(expect= false (!=
- (struct "a" 1 "b" true "c" (array "test"))
- (struct "a" 1 "b" true "c" (array "test"))))
+ {"a" 1 "b" true "c" ["test"]}
+ {"a" 1 "b" true "c" ["test"]}))
(expect= true (!=
- (struct "a" 1 "b" false "c" (array "test"))
- (struct "a" 1 "b" true "c" (array "test"))))
+ {"a" 1 "b" false "c" ["test"]}
+ {"a" 1 "b" true "c" ["test"]}))
(expect= true (!=
- (struct "a" 1 "b" true "c" (array "test" "toast"))
- (struct "a" 1 "b" true "c" (array "test"))))
+ {"a" 1 "b" true "c" ["test" "toast"]}
+ {"a" 1 "b" true "c" ["test"]}))
(expect= true (!=
- (struct "a" 1 "b" true)
- (struct "a" 1 "b" true "c" (array "test"))))
+ {"a" 1 "b" true}
+ {"a" 1 "b" true "c" ["test"]}))
(expect= true (!=
- (struct "a" 1 "b" true)
- (struct "a" 1)))
+ {"a" 1 "b" true}
+ {"a" 1}))
(expect= false (!= print print))
(expect= true (!= print ==))
'