diff --git a/test/arrays.tm b/test/arrays.tm index 5484d5e..8e30868 100644 --- a/test/arrays.tm +++ b/test/arrays.tm @@ -9,6 +9,9 @@ >> arr[-1] = 30 +>> #arr += 3 + sum := 0 for x in arr sum += x diff --git a/test/tables.tm b/test/tables.tm index 5b53fc8..2e7c479 100644 --- a/test/tables.tm +++ b/test/tables.tm @@ -1,12 +1,16 @@ >> t := {"one"=>1, "two"=>2; default=999} = {"one"=>1, "two"=>2; default=999} + >> t["one"] = 1 >> t["two"] = 2 >> t["???"] = 999 + +>> #t += 2 >> t.default = ?(readonly)999 >> t.fallback @@ -19,12 +23,16 @@ >> t2 := {"three"=>3; fallback=t} = {"three"=>3; fallback={"one"=>1, "two"=>2; default=999}} + >> t2["one"] = 1 >> t2["three"] = 3 >> t2["???"] = 999 + +>> #t2 += 1 >> t2.default = !Int64 >> t2.fallback