Skip to content

Commit 1081ea0

Browse files
Merge pull request RustPython#864 from sanxiyn/test-integer-literal
Test integer literals
2 parents 86acb7a + f9124f4 commit 1081ea0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/snippets/literals.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Integer literals
2+
assert 0b101010 == 42
3+
assert 0B101010 == 42
4+
assert 0o777 == 511
5+
assert 0O777 == 511
6+
assert 0xcafebabe == 3405691582
7+
assert 0Xcafebabe == 3405691582
8+
assert 0xCAFEBABE == 3405691582

0 commit comments

Comments
 (0)