diff options
| author | s-ol <s+removethis@s-ol.nu> | 2022-02-05 10:11:13 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | c484cce5ab1f6acd14ecad30adb586a6d5fa0fd1 (patch) | |
| tree | a45c702a83e150fea5b14b279e5f0cab9b65bc3e | |
| parent | examples: more smoothing in love example :) (diff) | |
| download | alive-c484cce5ab1f6acd14ecad30adb586a6d5fa0fd1.tar.gz alive-c484cce5ab1f6acd14ecad30adb586a6d5fa0fd1.zip | |
rearrange spec, fix for Lua 5.1
| -rw-r--r-- | alv/result/const.moon | 7 | ||||
| -rw-r--r-- | alv/result/sig.moon | 4 | ||||
| -rw-r--r-- | spec/internal/cell_spec.moon (renamed from spec/cell_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/input_spec.moon (renamed from spec/input_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/match_spec.moon (renamed from spec/match_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/parsing_spec.moon (renamed from spec/parsing_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/pureop_spec.moon (renamed from spec/pureop_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/registry_spec.moon (renamed from spec/registry_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/result/const_spec.moon (renamed from spec/result/const_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/result/evt_spec.moon (renamed from spec/result/evt_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/result/sig_spec.moon (renamed from spec/result/sig_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/rtnode_spec.moon (renamed from spec/rtnode_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/scope_spec.moon (renamed from spec/scope_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/tag_spec.moon (renamed from spec/tag_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/internal/type_spec.moon (renamed from spec/type_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/lib/array_spec.moon (renamed from spec/lang/array_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/lib/builtins/cond_spec.moon (renamed from spec/lang/cond_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/lib/builtins/do_spec.moon (renamed from spec/lang/do_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/lib/builtins/fn_spec.moon (renamed from spec/lang/fn_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/lib/builtins/literal_spec.moon (renamed from spec/lang/literal_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/lib/builtins/thread_spec.moon (renamed from spec/lang/thread_spec.moon) | 12 | ||||
| -rw-r--r-- | spec/lib/logic_spec.moon (renamed from spec/lang/logic_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/lib/math_spec.moon (renamed from spec/lang/math_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/lib/struct_spec.moon (renamed from spec/lang/struct_spec.moon) | 0 | ||||
| -rw-r--r-- | spec/lib/testing_spec.moon (renamed from spec/lang/testing_spec.moon) | 0 |
25 files changed, 10 insertions, 13 deletions
diff --git a/alv/result/const.moon b/alv/result/const.moon index bace973..48c79f1 100644 --- a/alv/result/const.moon +++ b/alv/result/const.moon @@ -42,11 +42,6 @@ class Constant extends Result --- alias for `unwrap`. __call: (...) => @unwrap ... - --- compare two values. - -- - -- Compares two `SigStream`s by comparing their types and their Lua values. - __eq: (other) => other.type == @type and @type\eq other.value, @value - --- Result metatype. -- @tfield string metatype (`=`) metatype: '=' @@ -186,6 +181,8 @@ class Constant extends Result with Constant.wrap args.value .meta = args.meta if args.meta + :__eq + { :Constant } diff --git a/alv/result/sig.moon b/alv/result/sig.moon index 7e9582f..519ef06 100644 --- a/alv/result/sig.moon +++ b/alv/result/sig.moon @@ -67,8 +67,6 @@ class SigStream extends Result @value = value @updated = COPILOT.T - :__eq - --- the wrapped Lua value. -- @tfield any value @@ -82,6 +80,8 @@ class SigStream extends Result -- @tparam ?any value the Lua value to be accessed through `unwrap` new: (type, @value) => super type + :__eq + { :SigStream } diff --git a/spec/cell_spec.moon b/spec/internal/cell_spec.moon index a8e79fe..a8e79fe 100644 --- a/spec/cell_spec.moon +++ b/spec/internal/cell_spec.moon diff --git a/spec/input_spec.moon b/spec/internal/input_spec.moon index 04cf16e..04cf16e 100644 --- a/spec/input_spec.moon +++ b/spec/internal/input_spec.moon diff --git a/spec/match_spec.moon b/spec/internal/match_spec.moon index b9d5ef6..b9d5ef6 100644 --- a/spec/match_spec.moon +++ b/spec/internal/match_spec.moon diff --git a/spec/parsing_spec.moon b/spec/internal/parsing_spec.moon index 0486276..0486276 100644 --- a/spec/parsing_spec.moon +++ b/spec/internal/parsing_spec.moon diff --git a/spec/pureop_spec.moon b/spec/internal/pureop_spec.moon index a8fa823..a8fa823 100644 --- a/spec/pureop_spec.moon +++ b/spec/internal/pureop_spec.moon diff --git a/spec/registry_spec.moon b/spec/internal/registry_spec.moon index 4b0cfc3..4b0cfc3 100644 --- a/spec/registry_spec.moon +++ b/spec/internal/registry_spec.moon diff --git a/spec/result/const_spec.moon b/spec/internal/result/const_spec.moon index 3f31306..3f31306 100644 --- a/spec/result/const_spec.moon +++ b/spec/internal/result/const_spec.moon diff --git a/spec/result/evt_spec.moon b/spec/internal/result/evt_spec.moon index 46d4cec..46d4cec 100644 --- a/spec/result/evt_spec.moon +++ b/spec/internal/result/evt_spec.moon diff --git a/spec/result/sig_spec.moon b/spec/internal/result/sig_spec.moon index 65363bc..65363bc 100644 --- a/spec/result/sig_spec.moon +++ b/spec/internal/result/sig_spec.moon diff --git a/spec/rtnode_spec.moon b/spec/internal/rtnode_spec.moon index f757067..f757067 100644 --- a/spec/rtnode_spec.moon +++ b/spec/internal/rtnode_spec.moon diff --git a/spec/scope_spec.moon b/spec/internal/scope_spec.moon index b4a55f1..b4a55f1 100644 --- a/spec/scope_spec.moon +++ b/spec/internal/scope_spec.moon diff --git a/spec/tag_spec.moon b/spec/internal/tag_spec.moon index f92dca0..f92dca0 100644 --- a/spec/tag_spec.moon +++ b/spec/internal/tag_spec.moon diff --git a/spec/type_spec.moon b/spec/internal/type_spec.moon index 727e90b..727e90b 100644 --- a/spec/type_spec.moon +++ b/spec/internal/type_spec.moon diff --git a/spec/lang/array_spec.moon b/spec/lib/array_spec.moon index b55cec6..b55cec6 100644 --- a/spec/lang/array_spec.moon +++ b/spec/lib/array_spec.moon diff --git a/spec/lang/cond_spec.moon b/spec/lib/builtins/cond_spec.moon index 89f7c7e..89f7c7e 100644 --- a/spec/lang/cond_spec.moon +++ b/spec/lib/builtins/cond_spec.moon diff --git a/spec/lang/do_spec.moon b/spec/lib/builtins/do_spec.moon index fd2825b..fd2825b 100644 --- a/spec/lang/do_spec.moon +++ b/spec/lib/builtins/do_spec.moon diff --git a/spec/lang/fn_spec.moon b/spec/lib/builtins/fn_spec.moon index af27cf3..af27cf3 100644 --- a/spec/lang/fn_spec.moon +++ b/spec/lib/builtins/fn_spec.moon diff --git a/spec/lang/literal_spec.moon b/spec/lib/builtins/literal_spec.moon index 3db010d..3db010d 100644 --- a/spec/lang/literal_spec.moon +++ b/spec/lib/builtins/literal_spec.moon diff --git a/spec/lang/thread_spec.moon b/spec/lib/builtins/thread_spec.moon index 9e84575..4b81119 100644 --- a/spec/lang/thread_spec.moon +++ b/spec/lib/builtins/thread_spec.moon @@ -6,19 +6,19 @@ describe "thread macros", -> it "thread forward (->)", -> rt = COPILOT\eval_once ' (import* math) - #((/ (+ 10 2) 2) = 6) + #((/ (+ 10 2) 8) = 1.5) (-> 10 (+ 2) - (/ 2))' + (/ 8))' assert.is.true rt\is_const! - assert.is.equal '<num= 6.0>', tostring rt.result + assert.is.equal '<num= 1.5>', tostring rt.result it "thread last forward (->>)", -> rt = COPILOT\eval_once ' (import* math) - #((/ 10 (+ 2 3)) = 2) - (->> 3 + #((/ 10 (+ 2 2)) = 2.5) + (->> 2 (+ 2) (/ 10))' assert.is.true rt\is_const! - assert.is.equal '<num= 2.0>', tostring rt.result + assert.is.equal '<num= 2.5>', tostring rt.result diff --git a/spec/lang/logic_spec.moon b/spec/lib/logic_spec.moon index f3d0610..f3d0610 100644 --- a/spec/lang/logic_spec.moon +++ b/spec/lib/logic_spec.moon diff --git a/spec/lang/math_spec.moon b/spec/lib/math_spec.moon index 23a353b..23a353b 100644 --- a/spec/lang/math_spec.moon +++ b/spec/lib/math_spec.moon diff --git a/spec/lang/struct_spec.moon b/spec/lib/struct_spec.moon index 9937f99..9937f99 100644 --- a/spec/lang/struct_spec.moon +++ b/spec/lib/struct_spec.moon diff --git a/spec/lang/testing_spec.moon b/spec/lib/testing_spec.moon index 5be7848..5be7848 100644 --- a/spec/lang/testing_spec.moon +++ b/spec/lib/testing_spec.moon |
