MCPcopy Index your code
hub / github.com/python/mypy / test_branch_no_else

Method test_branch_no_else

mypyc/test/test_emitfunc.py:213–220  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

211 )
212
213 def test_branch_no_else(self) -> None:
214 next_block = BasicBlock(9)
215 b = Branch(self.b, BasicBlock(8), next_block, Branch.BOOL)
216 self.assert_emit(b, """if (cpy_r_b) goto CPyL8;""", next_block=next_block)
217 next_block = BasicBlock(9)
218 b = Branch(self.b, BasicBlock(8), next_block, Branch.BOOL)
219 b.negated = True
220 self.assert_emit(b, """if (!cpy_r_b) goto CPyL8;""", next_block=next_block)
221
222 def test_branch_no_else_negated(self) -> None:
223 next_block = BasicBlock(1)

Callers

nothing calls this directly

Calls 3

assert_emitMethod · 0.95
BasicBlockClass · 0.90
BranchClass · 0.90

Tested by

no test coverage detected