aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/collections.nom4
-rw-r--r--tests/control_flow.nom2
-rw-r--r--tests/math.nom2
-rw-r--r--tests/object.nom2
-rw-r--r--tests/operators.nom4
5 files changed, 4 insertions, 10 deletions
diff --git a/tests/collections.nom b/tests/collections.nom
index 2cc6adf..4170d17 100644
--- a/tests/collections.nom
+++ b/tests/collections.nom
@@ -4,8 +4,6 @@
use "core"
assume ((2nd to last in [1,2,3,4,5]) = 4)
-assume ((first in [1,2]) = 1)
-assume ((last in [1,2]) = 2)
assume (3 is in [1,2,3,4,5])
assume (99 isn't in [1,2,3])
assume ({x:no} has key "x")
@@ -27,7 +25,7 @@ assume (([[1,2],[3,4]] flattened) = [1,2,3,4])
assume ((entries in {x:1}) = [{key:"x",value:1}])
assume ((keys in {x:1}) = ["x"])
assume ((values in {x:1}) = [1])
-#assume ((sorted [3,1,2]) = [1,2,3])
+assume ((sorted [3,1,2]) = [1,2,3])
%x <- [3,1,2]
sort %x
assume (%x = [1,2,3])
diff --git a/tests/control_flow.nom b/tests/control_flow.nom
index 5553811..20ccabe 100644
--- a/tests/control_flow.nom
+++ b/tests/control_flow.nom
@@ -104,7 +104,7 @@ assume (%x = 6) or barf "backwards numeric for range failed"
%result <- {}
for %key = %value in {x:1,y:2}
- (%result's ("\%key\%key")) <- (%value * 11)
+ %result.("\%key\%key") <- (%value * 11)
assume (%result = {xx:11,yy:22}) or barf "key/value iteration failed"
for %key = %value in {x:1,y:2}
diff --git a/tests/math.nom b/tests/math.nom
index 8cfd0f4..115354c 100644
--- a/tests/math.nom
+++ b/tests/math.nom
@@ -11,7 +11,7 @@ assume
all of [..]
abs 5, |5|, sqrt 5, √(5), sine 5, cosine 5, tangent 5, arc sine 5, arc cosine 5,
arc tangent 5, arc tangent 5/10, hyperbolic sine 5, hyperbolic cosine 5,
- hyperbolic tangent 5, e^5, ln 5, log_(2) 5, floor 5, ceiling 5, round 5,
+ hyperbolic tangent 5, e^5, ln 5, log base 2 of 5, floor 5, ceiling 5, round 5,
..or barf "math functions failed"
assume ((463 to the nearest 100) = 500) or barf "rounding failed"
assume ((2.6 to the nearest 0.25) = 2.5) or barf "rounding failed"
diff --git a/tests/object.nom b/tests/object.nom
index 041b784..8ad5b82 100644
--- a/tests/object.nom
+++ b/tests/object.nom
@@ -18,7 +18,7 @@ as %d
assume: ((me).barks) = 3
assume: (bark) = "Bark! Bark! Bark!"
assume: "\(%d.class)" = "Dog"
-assume: (%d's "barks") = 3
+assume: %d.barks = 3
as: new "Dog" {barks:1}
assume: (bark) = "Bark!"
diff --git a/tests/operators.nom b/tests/operators.nom
index b3853e9..2452ba5 100644
--- a/tests/operators.nom
+++ b/tests/operators.nom
@@ -3,10 +3,6 @@
use "core"
-assume (({x:5}'s "x") = 5) or barf "indexing doesn't work."
-try: % <- ({}'s "[[[\n]]]")
-..and if it barfs: barf "failed to index a table literal with a string containing brackets n stuff"
-
<-{%x:10,%y:20}
assume ((%x = 10) and (%y = 20)) or barf "mutli-assignment failed."
<-{%x:%y, %y:%x}