aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-03 13:37:05 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-03-03 13:37:05 -0500
commitbf5a7253458ec5b3f4fe054b3b2f5f80211c1892 (patch)
treee2ec63d23498c661bfda29dafa3e0311ed1140d1 /test
parentec7a9e5f107a68072b3a4dd84aa6a4b461657345 (diff)
Definitively go with "Int" and "Num" over "Int64" and "Num64", plus add
Int__bits()
Diffstat (limited to 'test')
-rw-r--r--test/integers.tm15
-rw-r--r--test/tables.tm4
2 files changed, 16 insertions, 3 deletions
diff --git a/test/integers.tm b/test/integers.tm
index c20d08e6..2570521a 100644
--- a/test/integers.tm
+++ b/test/integers.tm
@@ -15,7 +15,7 @@
= 3_i16
>> 2 ^ 10
-= 1024 : Num64
+= 1024 : Num
>> 3 and 2
= 2
@@ -31,3 +31,16 @@ for x in 5
nums ++= "{x},"
>> nums
= "1,2,3,4,5,"
+
+>> x := 123
+>> x:hex()
+= "0x7B"
+>> x:octal()
+= "0o173"
+
+>> Int.random()
+>> Int.min
+= -9223372036854775808
+>> Int.max
+= 9223372036854775807
+
diff --git a/test/tables.tm b/test/tables.tm
index 891e0614..7c614466 100644
--- a/test/tables.tm
+++ b/test/tables.tm
@@ -20,7 +20,7 @@ for k,v in t
>> t.default
= ?(readonly)999
>> t.fallback
-= !{Str=>Int64}
+= !{Str=>Int}
>> t.keys
= ["one", "two"]
@@ -40,7 +40,7 @@ for k,v in t
>> #t2
= 1
>> t2.default
-= !Int64
+= !Int
>> t2.fallback
= ?(readonly){"one"=>1, "two"=>2; default=999}