mirror of
https://github.com/janet-lang/janet
synced 2025-10-23 11:47:40 +00:00
Integers convert to plain number strings.
A user can use (type n) to find the true type, the old behavior did not seem useful for most uses of the string function.
This commit is contained in:
@@ -65,6 +65,9 @@
|
||||
(assert (:== (:/ (u64 "0xffff_ffff_ffff_ffff") 8 2) "0xfffffffffffffff") "bigint operations")
|
||||
(assert (let [a (u64 0xff)] (:== (:+ a a a a) (:* a 2 2))) "bigint operations")
|
||||
|
||||
(assert (= (string (i64 -123)) "-123") "i64 prints reasonably")
|
||||
(assert (= (string (u64 123)) "123") "u64 prints reasonably")
|
||||
|
||||
(assert-error
|
||||
"trap INT64_MIN / -1"
|
||||
(:/ (int/s64 "-0x8000_0000_0000_0000") -1))
|
||||
|
Reference in New Issue
Block a user