aboutsummaryrefslogtreecommitdiff
path: root/test/integers.tm
diff options
context:
space:
mode:
Diffstat (limited to 'test/integers.tm')
-rw-r--r--test/integers.tm36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/integers.tm b/test/integers.tm
index ad9c40d7..323508da 100644
--- a/test/integers.tm
+++ b/test/integers.tm
@@ -11,21 +11,21 @@ func main():
>> 2 * 3 + 4
= 10
- >> 1[8] + 2[16]
- = 3[16]
+ >> Int8(1) + Int16(2)
+ = Int16(3)
>> 1 << 10
= 1024
!! Signed and unsigned bit shifting:
- >> -2[64] << 1
- = -4[64]
- >> -2[64] <<< 1
- = -4[64]
- >> -2[64] >> 1
- = -1[64]
- >> -2[64] >>> 1
- = 9223372036854775807[64]
+ >> Int64(-2) << 1
+ = Int64(-4)
+ >> Int64(-2) <<< 1
+ = Int64(-4)
+ >> Int64(-2) >> 1
+ = Int64(-1)
+ >> Int64(-2) >>> 1
+ = Int64(9223372036854775807)
>> 3 and 2
= 2
@@ -42,7 +42,7 @@ func main():
>> nums
= "1,2,3,4,5,"
- >> x := 123[64]
+ >> x := Int64(123)
>> x:format(digits=5)
= "00123"
>> x:hex()
@@ -51,16 +51,16 @@ func main():
= "0o173"
>> Int64.min
- = -9223372036854775808[64]
+ = Int64(-9223372036854775808)
>> Int64.max
- = 9223372036854775807[64]
+ = Int64(9223372036854775807)
- >> 123[32]:hex()
+ >> Int32(123):hex()
= "0x7B"
- >> 123[16]:hex()
+ >> Int16(123):hex()
= "0x7B"
- >> 123[8]:hex()
+ >> Int8(123):hex()
= "0x7B"
>> Int(2.1)
@@ -127,6 +127,6 @@ func main():
= 0
>> Int64(yes)
- = 1[64]
+ = Int64(1)
>> Int64(no)
- = 0[64]
+ = Int64(0)