diff options
| author | mryouse | 2022-07-05 03:24:49 +0000 |
|---|---|---|
| committer | mryouse | 2022-07-05 03:24:49 +0000 |
| commit | 2402523aa84780447e3ce0a8109a14e1286665c8 (patch) | |
| tree | 8bb4792c24154defbb046ca17a879bbb01da94b0 /tests/math/multiplication | |
| parent | db0327ba8c9fae4a57f85f60e2f0bac438781b8e (diff) | |
| parent | cf0ae625ddc9076e0ca02079b8d461de22244998 (diff) | |
Merge branch 'master' into feature/listtypes
Diffstat (limited to 'tests/math/multiplication')
| -rw-r--r-- | tests/math/multiplication/bad_arity_one.neb | 2 | ||||
| -rw-r--r-- | tests/math/multiplication/bad_arity_zero.neb | 2 | ||||
| -rw-r--r-- | tests/math/multiplication/bad_type_bool.neb | 2 | ||||
| -rw-r--r-- | tests/math/multiplication/bad_type_list.neb | 2 | ||||
| -rw-r--r-- | tests/math/multiplication/bad_type_string.neb | 2 | ||||
| -rw-r--r-- | tests/math/multiplication/bad_type_type.neb | 2 | ||||
| -rw-r--r-- | tests/math/multiplication/happy.neb | 9 |
7 files changed, 21 insertions, 0 deletions
diff --git a/tests/math/multiplication/bad_arity_one.neb b/tests/math/multiplication/bad_arity_one.neb new file mode 100644 index 0000000..740725a --- /dev/null +++ b/tests/math/multiplication/bad_arity_one.neb @@ -0,0 +1,2 @@ +(* 7) +; panic! [1] '*': expected [2+] arguments, received 1 diff --git a/tests/math/multiplication/bad_arity_zero.neb b/tests/math/multiplication/bad_arity_zero.neb new file mode 100644 index 0000000..f1301ae --- /dev/null +++ b/tests/math/multiplication/bad_arity_zero.neb @@ -0,0 +1,2 @@ +(*) +; panic! [1] '*': expected [2+] arguments, received 0 diff --git a/tests/math/multiplication/bad_type_bool.neb b/tests/math/multiplication/bad_type_bool.neb new file mode 100644 index 0000000..5344e1a --- /dev/null +++ b/tests/math/multiplication/bad_type_bool.neb @@ -0,0 +1,2 @@ +(* 7.34 #true) +; panic! [1] '*': received :bool, expected :number (got #true) diff --git a/tests/math/multiplication/bad_type_list.neb b/tests/math/multiplication/bad_type_list.neb new file mode 100644 index 0000000..9bc8418 --- /dev/null +++ b/tests/math/multiplication/bad_type_list.neb @@ -0,0 +1,2 @@ +(* 4 (list "hello")) +; panic! [1] '*': received :list, expected :number (got ("hello")) diff --git a/tests/math/multiplication/bad_type_string.neb b/tests/math/multiplication/bad_type_string.neb new file mode 100644 index 0000000..ca9b70d --- /dev/null +++ b/tests/math/multiplication/bad_type_string.neb @@ -0,0 +1,2 @@ +(* 3 "hello") +; panic! [1] '*': received :string, expected :number (got "hello") diff --git a/tests/math/multiplication/bad_type_type.neb b/tests/math/multiplication/bad_type_type.neb new file mode 100644 index 0000000..4d0d2d1 --- /dev/null +++ b/tests/math/multiplication/bad_type_type.neb @@ -0,0 +1,2 @@ +(* .4 :string) +; panic! [1] '*': received :type, expected :number (got :string) diff --git a/tests/math/multiplication/happy.neb b/tests/math/multiplication/happy.neb new file mode 100644 index 0000000..8233975 --- /dev/null +++ b/tests/math/multiplication/happy.neb @@ -0,0 +1,9 @@ +(print + (concat + (->string (* 4 5)) " " + (->string (* 2.9 4)) " " + (->string (* 2 4.5)) " " + (->string (* 1.1 4.5)) " " + (->string (* 6 7 8 15)))) + +; 20 11.6 9.0 4.95 5040 |
