summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/typ/compute/construct.typ11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/typ/compute/construct.typ b/tests/typ/compute/construct.typ
index 9c05a6d0..aea15b53 100644
--- a/tests/typ/compute/construct.typ
+++ b/tests/typ/compute/construct.typ
@@ -64,6 +64,9 @@
---
// Test conversion to string.
#test(str(123), "123")
+#test(str(123, base: 3), "11120")
+#test(str(-123, base: 16), "-7b")
+#test(str(9223372036854775807, base: 36), "1y2p0ij32e8e7")
#test(str(50.14), "50.14")
#test(str(10 / 3).len() > 10, true)
@@ -72,6 +75,14 @@
#str([])
---
+// Error: 17-19 base must be between 2 and 36
+#str(123, base: 99)
+
+---
+// Error: 18-19 base is only supported for integers
+#str(1.23, base: 2)
+
+---
#assert(range(2, 5) == (2, 3, 4))
---