From e169e50e9d2ab5584e3b72ed069e7695a123e1e7 Mon Sep 17 00:00:00 2001 From: mryouse Date: Sun, 3 Jul 2022 01:00:18 +0000 Subject: initial commit of tests for math things --- tests/math/lessthan/bad_arity_one.neb | 2 ++ tests/math/lessthan/bad_arity_three.neb | 2 ++ tests/math/lessthan/bad_arity_zero.neb | 2 ++ tests/math/lessthan/bad_type_bool.neb | 2 ++ tests/math/lessthan/bad_type_list.neb | 2 ++ tests/math/lessthan/bad_type_string.neb | 2 ++ tests/math/lessthan/bad_type_type.neb | 2 ++ tests/math/lessthan/happy.neb | 9 +++++++++ 8 files changed, 23 insertions(+) create mode 100644 tests/math/lessthan/bad_arity_one.neb create mode 100644 tests/math/lessthan/bad_arity_three.neb create mode 100644 tests/math/lessthan/bad_arity_zero.neb create mode 100644 tests/math/lessthan/bad_type_bool.neb create mode 100644 tests/math/lessthan/bad_type_list.neb create mode 100644 tests/math/lessthan/bad_type_string.neb create mode 100644 tests/math/lessthan/bad_type_type.neb create mode 100644 tests/math/lessthan/happy.neb (limited to 'tests/math/lessthan') diff --git a/tests/math/lessthan/bad_arity_one.neb b/tests/math/lessthan/bad_arity_one.neb new file mode 100644 index 0000000..9e33b3e --- /dev/null +++ b/tests/math/lessthan/bad_arity_one.neb @@ -0,0 +1,2 @@ +(< 7) +; panic! [1] '<': expected [2] arguments, received 1 diff --git a/tests/math/lessthan/bad_arity_three.neb b/tests/math/lessthan/bad_arity_three.neb new file mode 100644 index 0000000..fedcbd2 --- /dev/null +++ b/tests/math/lessthan/bad_arity_three.neb @@ -0,0 +1,2 @@ +(< 20 4 5) +; panic! [1] '<': expected [2] arguments, received 3 diff --git a/tests/math/lessthan/bad_arity_zero.neb b/tests/math/lessthan/bad_arity_zero.neb new file mode 100644 index 0000000..64217c6 --- /dev/null +++ b/tests/math/lessthan/bad_arity_zero.neb @@ -0,0 +1,2 @@ +(<) +; panic! [1] '<': expected [2] arguments, received 0 diff --git a/tests/math/lessthan/bad_type_bool.neb b/tests/math/lessthan/bad_type_bool.neb new file mode 100644 index 0000000..b68fb9f --- /dev/null +++ b/tests/math/lessthan/bad_type_bool.neb @@ -0,0 +1,2 @@ +(< 7.34 #true) +; panic! [1] '<': received :bool, expected :number (got #true) diff --git a/tests/math/lessthan/bad_type_list.neb b/tests/math/lessthan/bad_type_list.neb new file mode 100644 index 0000000..7b1153c --- /dev/null +++ b/tests/math/lessthan/bad_type_list.neb @@ -0,0 +1,2 @@ +(< 4 (list "hello")) +; panic! [1] '<': received :list, expected :number (got ("hello")) diff --git a/tests/math/lessthan/bad_type_string.neb b/tests/math/lessthan/bad_type_string.neb new file mode 100644 index 0000000..b98f088 --- /dev/null +++ b/tests/math/lessthan/bad_type_string.neb @@ -0,0 +1,2 @@ +(< 3 "hello") +; panic! [1] '<': received :string, expected :number (got "hello") diff --git a/tests/math/lessthan/bad_type_type.neb b/tests/math/lessthan/bad_type_type.neb new file mode 100644 index 0000000..339d283 --- /dev/null +++ b/tests/math/lessthan/bad_type_type.neb @@ -0,0 +1,2 @@ +(< .4 :string) +; panic! [1] '<': received :type, expected :number (got :string) diff --git a/tests/math/lessthan/happy.neb b/tests/math/lessthan/happy.neb new file mode 100644 index 0000000..796a8f1 --- /dev/null +++ b/tests/math/lessthan/happy.neb @@ -0,0 +1,9 @@ +(print + (concat + (->string (< 20 5)) " " + (->string (< 3.6 2)) " " + (->string (< 1 2.5)) " " + (->string (< 5 5)) " " + (->string (< 1.1 4.4)))) + +; #false #false #true #false #true -- cgit v1.2.3