diff options
Diffstat (limited to 'tests/math/floor')
| -rw-r--r-- | tests/math/floor/bad_arity_two.neb | 2 | ||||
| -rw-r--r-- | tests/math/floor/bad_arity_zero.neb | 2 | ||||
| -rw-r--r-- | tests/math/floor/bad_type_bool.neb | 2 | ||||
| -rw-r--r-- | tests/math/floor/bad_type_list.neb | 2 | ||||
| -rw-r--r-- | tests/math/floor/bad_type_string.neb | 2 | ||||
| -rw-r--r-- | tests/math/floor/bad_type_type.neb | 2 | ||||
| -rw-r--r-- | tests/math/floor/happy.neb | 7 |
7 files changed, 19 insertions, 0 deletions
diff --git a/tests/math/floor/bad_arity_two.neb b/tests/math/floor/bad_arity_two.neb new file mode 100644 index 0000000..2968901 --- /dev/null +++ b/tests/math/floor/bad_arity_two.neb @@ -0,0 +1,2 @@ +(floor 20 4) +; panic! [1] 'floor': expected [1] arguments, received 2 diff --git a/tests/math/floor/bad_arity_zero.neb b/tests/math/floor/bad_arity_zero.neb new file mode 100644 index 0000000..cc21ccc --- /dev/null +++ b/tests/math/floor/bad_arity_zero.neb @@ -0,0 +1,2 @@ +(floor) +; panic! [1] 'floor': expected [1] arguments, received 0 diff --git a/tests/math/floor/bad_type_bool.neb b/tests/math/floor/bad_type_bool.neb new file mode 100644 index 0000000..4404bfc --- /dev/null +++ b/tests/math/floor/bad_type_bool.neb @@ -0,0 +1,2 @@ +(floor #true) +; panic! [1] 'floor': received :bool, expected :number (got #true) diff --git a/tests/math/floor/bad_type_list.neb b/tests/math/floor/bad_type_list.neb new file mode 100644 index 0000000..a0d3b3b --- /dev/null +++ b/tests/math/floor/bad_type_list.neb @@ -0,0 +1,2 @@ +(floor (list "hello")) +; panic! [1] 'floor': received :list, expected :number (got ("hello")) diff --git a/tests/math/floor/bad_type_string.neb b/tests/math/floor/bad_type_string.neb new file mode 100644 index 0000000..c1abd33 --- /dev/null +++ b/tests/math/floor/bad_type_string.neb @@ -0,0 +1,2 @@ +(floor "hello") +; panic! [1] 'floor': received :string, expected :number (got "hello") diff --git a/tests/math/floor/bad_type_type.neb b/tests/math/floor/bad_type_type.neb new file mode 100644 index 0000000..d5383cf --- /dev/null +++ b/tests/math/floor/bad_type_type.neb @@ -0,0 +1,2 @@ +(floor :string) +; panic! [1] 'floor': received :type, expected :number (got :string) diff --git a/tests/math/floor/happy.neb b/tests/math/floor/happy.neb new file mode 100644 index 0000000..7fda23e --- /dev/null +++ b/tests/math/floor/happy.neb @@ -0,0 +1,7 @@ +(print + (concat + (->string (floor 5)) " " + (->string (floor 3.6)) " " + (->string (floor 2.5)))) + +; 5 3 2 |
