1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
20 assert 0b111001101 == 0o715
23 assert 0b1_1100_1101 == 0o715
24 assert 0b1_1100_1101 == 0x1_
CD
25 assert 0b1000_1001 == 0x89
26 assert 0b1000_1001u
8 == 0x89u
8
27 assert 0o151u8
== 0b0110_1001u
8
28 assert 0x69u
8 == 0o151u8
29 assert 12_125 == 0x2F5D
30 assert 0o27_535
== 1212_5
31 assert 2_55u
8 == 0xFFu
8