Skip to content

Commit

Permalink
TEST: More test for chr() and ord()
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Mar 7, 2023
1 parent f3564bc commit 0ad626d
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions integration_tests/test_builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,34 @@ def test_chr():
assert(chr(125) == '}') # testing compile time implementation
assert(right_brace == '}') # testing runtime implementation

def more_test():
p: i32
q: i32
r: i32
s: i32
p = 97 # char 'a'
q = 112 # char 'p'
r = 10 # newline char
s = 65 # char 'A'

print(chr(p))
print(chr(q))
print(chr(r))
print(chr(s))

a: str
b: str
c: str
d: str
a = "!"
b = " "
c = "Z"
d = "g"
print(ord(a))
print(ord(b))
print(ord(c))
print(ord(d))

test_ord()
test_chr()




more_test()

0 comments on commit 0ad626d

Please sign in to comment.