Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add failing test case
  • Loading branch information
JukkaL committed Jun 18, 2023
commit fabfa1a5ebacf7e6bcb1b44ecff1aff6c2d1df5f
21 changes: 21 additions & 0 deletions mypyc/test-data/irbuild-i16.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Test cases for i16 native ints. Focus on things that are different from i64; no need to
# duplicate all i64 test cases here.

[case testI16BinaryOp]
from mypy_extensions import i16

def add_op(x: i16, y: i16) -> i16:
x = y + x
y = x + 5
y += x
y += 7
x = 5 + y
return x
def compare(x: i16, y: i16) -> None:
a = x == y
b = x == -5
c = x < y
d = x < -5
e = -5 == x
f = -5 < x
[out]
1 change: 1 addition & 0 deletions mypyc/test/test_irbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"irbuild-strip-asserts.test",
"irbuild-i64.test",
"irbuild-i32.test",
"irbuild-i16.test",
"irbuild-vectorcall.test",
"irbuild-unreachable.test",
"irbuild-isinstance.test",
Expand Down