From 570c528b3e4e41af2bb8ec0cf091e52dd50db13a Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 4 Apr 2023 15:22:48 +0200 Subject: Integers with different bases --- tests/typ/compiler/ops.typ | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/typ') diff --git a/tests/typ/compiler/ops.typ b/tests/typ/compiler/ops.typ index a29003ed..1a9a2169 100644 --- a/tests/typ/compiler/ops.typ +++ b/tests/typ/compiler/ops.typ @@ -109,6 +109,20 @@ } } +--- +// Test numbers with alternative bases. +#test(0x10, 16) +#test(0b1101, 13) +#test(0xA + 0xa, 0x14) + +--- +// Error: 2-7 invalid binary number +#0b123 + +--- +// Error: 2-8 invalid hexadecimal number +#0x123z + --- // Test boolean operators. -- cgit v1.2.3