MCPcopy
hub / github.com/python/mypy / test_int_op

Method test_int_op

mypyc/test/test_pprint.py:28–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26 assert generate_names_for_ir([reg], []) == {reg: "foo"}
27
28 def test_int_op(self) -> None:
29 n1 = Integer(2)
30 n2 = Integer(4)
31 op1 = IntOp(int_rprimitive, n1, n2, IntOp.ADD)
32 op2 = IntOp(int_rprimitive, op1, n2, IntOp.ADD)
33 block = make_block([op1, op2, Unreachable()])
34 assert generate_names_for_ir([], [block]) == {op1: "r0", op2: "r1"}
35
36 def test_assign(self) -> None:
37 reg = register("foo")

Callers

nothing calls this directly

Calls 5

IntegerClass · 0.90
IntOpClass · 0.90
UnreachableClass · 0.90
generate_names_for_irFunction · 0.90
make_blockFunction · 0.85

Tested by

no test coverage detected