aboutsummaryrefslogtreecommitdiff
path: root/tests/math/greaterthanequal
diff options
context:
space:
mode:
authormryouse2022-07-03 01:00:18 +0000
committermryouse2022-07-03 01:00:18 +0000
commite169e50e9d2ab5584e3b72ed069e7695a123e1e7 (patch)
tree47c0ec4120518807e3a60a133502e9e84f126153 /tests/math/greaterthanequal
parent74a048dd493788bab9f9c93b0ed6d925a998822b (diff)
initial commit of tests for math things
Diffstat (limited to 'tests/math/greaterthanequal')
-rw-r--r--tests/math/greaterthanequal/bad_arity_one.neb2
-rw-r--r--tests/math/greaterthanequal/bad_arity_three.neb2
-rw-r--r--tests/math/greaterthanequal/bad_arity_zero.neb2
-rw-r--r--tests/math/greaterthanequal/bad_type_bool.neb2
-rw-r--r--tests/math/greaterthanequal/bad_type_list.neb2
-rw-r--r--tests/math/greaterthanequal/bad_type_string.neb2
-rw-r--r--tests/math/greaterthanequal/bad_type_type.neb2
-rw-r--r--tests/math/greaterthanequal/happy.neb10
8 files changed, 24 insertions, 0 deletions
diff --git a/tests/math/greaterthanequal/bad_arity_one.neb b/tests/math/greaterthanequal/bad_arity_one.neb
new file mode 100644
index 0000000..4de4de8
--- /dev/null
+++ b/tests/math/greaterthanequal/bad_arity_one.neb
@@ -0,0 +1,2 @@
+(>= 7)
+; panic! [1] '>=': expected [2] arguments, received 1
diff --git a/tests/math/greaterthanequal/bad_arity_three.neb b/tests/math/greaterthanequal/bad_arity_three.neb
new file mode 100644
index 0000000..20861f1
--- /dev/null
+++ b/tests/math/greaterthanequal/bad_arity_three.neb
@@ -0,0 +1,2 @@
+(>= 20 4 5)
+; panic! [1] '>=': expected [2] arguments, received 3
diff --git a/tests/math/greaterthanequal/bad_arity_zero.neb b/tests/math/greaterthanequal/bad_arity_zero.neb
new file mode 100644
index 0000000..56c08ac
--- /dev/null
+++ b/tests/math/greaterthanequal/bad_arity_zero.neb
@@ -0,0 +1,2 @@
+(>=)
+; panic! [1] '>=': expected [2] arguments, received 0
diff --git a/tests/math/greaterthanequal/bad_type_bool.neb b/tests/math/greaterthanequal/bad_type_bool.neb
new file mode 100644
index 0000000..3fd50e2
--- /dev/null
+++ b/tests/math/greaterthanequal/bad_type_bool.neb
@@ -0,0 +1,2 @@
+(>= 7.34 #true)
+; panic! [1] '>=': received :bool, expected :number (got #true)
diff --git a/tests/math/greaterthanequal/bad_type_list.neb b/tests/math/greaterthanequal/bad_type_list.neb
new file mode 100644
index 0000000..b7b9cf8
--- /dev/null
+++ b/tests/math/greaterthanequal/bad_type_list.neb
@@ -0,0 +1,2 @@
+(>= 4 (list "hello"))
+; panic! [1] '>=': received :list, expected :number (got ("hello"))
diff --git a/tests/math/greaterthanequal/bad_type_string.neb b/tests/math/greaterthanequal/bad_type_string.neb
new file mode 100644
index 0000000..10fdaea
--- /dev/null
+++ b/tests/math/greaterthanequal/bad_type_string.neb
@@ -0,0 +1,2 @@
+(>= 3 "hello")
+; panic! [1] '>=': received :string, expected :number (got "hello")
diff --git a/tests/math/greaterthanequal/bad_type_type.neb b/tests/math/greaterthanequal/bad_type_type.neb
new file mode 100644
index 0000000..ae5b166
--- /dev/null
+++ b/tests/math/greaterthanequal/bad_type_type.neb
@@ -0,0 +1,2 @@
+(>= .4 :string)
+; panic! [1] '>=': received :type, expected :number (got :string)
diff --git a/tests/math/greaterthanequal/happy.neb b/tests/math/greaterthanequal/happy.neb
new file mode 100644
index 0000000..16d3c66
--- /dev/null
+++ b/tests/math/greaterthanequal/happy.neb
@@ -0,0 +1,10 @@
+(print
+ (concat
+ (->string (>= 20 5)) " "
+ (->string (>= 3.6 2)) " "
+ (->string (>= 1 2.5)) " "
+ (->string (>= 5 5)) " "
+ (->string (>= 45 45.0)) " "
+ (->string (>= 1.1 4.4))))
+
+; #true #true #false #true #true #false