diff options
Diffstat (limited to 'tests/math/division')
| -rw-r--r-- | tests/math/division/bad_arity_one.neb | 2 | ||||
| -rw-r--r-- | tests/math/division/bad_arity_three.neb | 2 | ||||
| -rw-r--r-- | tests/math/division/bad_arity_zero.neb | 2 | ||||
| -rw-r--r-- | tests/math/division/bad_type_bool.neb | 2 | ||||
| -rw-r--r-- | tests/math/division/bad_type_list.neb | 2 | ||||
| -rw-r--r-- | tests/math/division/bad_type_string.neb | 2 | ||||
| -rw-r--r-- | tests/math/division/bad_type_type.neb | 2 | ||||
| -rw-r--r-- | tests/math/division/happy.neb | 8 |
8 files changed, 22 insertions, 0 deletions
diff --git a/tests/math/division/bad_arity_one.neb b/tests/math/division/bad_arity_one.neb new file mode 100644 index 0000000..eb243d1 --- /dev/null +++ b/tests/math/division/bad_arity_one.neb @@ -0,0 +1,2 @@ +(/ 7) +; panic! [1] '/': expected [2] arguments, received 1 diff --git a/tests/math/division/bad_arity_three.neb b/tests/math/division/bad_arity_three.neb new file mode 100644 index 0000000..34f7313 --- /dev/null +++ b/tests/math/division/bad_arity_three.neb @@ -0,0 +1,2 @@ +(/ 20 4 5) +; panic! [1] '/': expected [2] arguments, received 3 diff --git a/tests/math/division/bad_arity_zero.neb b/tests/math/division/bad_arity_zero.neb new file mode 100644 index 0000000..c5c47c3 --- /dev/null +++ b/tests/math/division/bad_arity_zero.neb @@ -0,0 +1,2 @@ +(/) +; panic! [1] '/': expected [2] arguments, received 0 diff --git a/tests/math/division/bad_type_bool.neb b/tests/math/division/bad_type_bool.neb new file mode 100644 index 0000000..ad15afe --- /dev/null +++ b/tests/math/division/bad_type_bool.neb @@ -0,0 +1,2 @@ +(/ 7.34 #true) +; panic! [1] '/': received :bool, expected :number (got #true) diff --git a/tests/math/division/bad_type_list.neb b/tests/math/division/bad_type_list.neb new file mode 100644 index 0000000..e394b7b --- /dev/null +++ b/tests/math/division/bad_type_list.neb @@ -0,0 +1,2 @@ +(/ 4 (list "hello")) +; panic! [1] '/': received :list, expected :number (got ("hello")) diff --git a/tests/math/division/bad_type_string.neb b/tests/math/division/bad_type_string.neb new file mode 100644 index 0000000..11f236e --- /dev/null +++ b/tests/math/division/bad_type_string.neb @@ -0,0 +1,2 @@ +(/ 3 "hello") +; panic! [1] '/': received :string, expected :number (got "hello") diff --git a/tests/math/division/bad_type_type.neb b/tests/math/division/bad_type_type.neb new file mode 100644 index 0000000..c008850 --- /dev/null +++ b/tests/math/division/bad_type_type.neb @@ -0,0 +1,2 @@ +(/ .4 :string) +; panic! [1] '/': received :type, expected :number (got :string) diff --git a/tests/math/division/happy.neb b/tests/math/division/happy.neb new file mode 100644 index 0000000..dc0692d --- /dev/null +++ b/tests/math/division/happy.neb @@ -0,0 +1,8 @@ +(print + (concat + (->string (/ 20 5)) " " + (->string (/ 3.6 2)) " " + (->string (/ 4 2.5)) " " + (->string (/ 1.1 4.4)))) + +; 4 1.8 1.6 0.25 |
