Skip to content

Commit

Permalink
TEST: Fix test for unsigned int bitnot
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaikh-Ubaid committed Jul 19, 2023
1 parent 43d7018 commit 9d627f4
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions integration_tests/test_unary_op_04.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
from lpython import u16
from lpython import u16, bitnot_u16

def foo(grp: u16) -> u16:
i: u16 = ~(u16(grp))

i: u16 = bitnot_u16(grp)
return i


def foo2() -> u16:
i: u16 = ~(u16(0xffff))

i: u16 = bitnot_u16(u16(0xffff))
return i

def foo3() -> u16:
i: u16 = ~(u16(0xffff))

return ~i
i: u16 = bitnot_u16(u16(0xffff))
return bitnot_u16(i)

assert foo(u16(0)) == u16(0xffff)
assert foo(u16(0xffff)) == u16(0)
Expand Down

0 comments on commit 9d627f4

Please sign in to comment.