Reorganize and cleanup tests
This commit is contained in:
parent
ea452bd33c
commit
fac1bc782d
36 changed files with 1780 additions and 1592 deletions
26
llvm/tests/test_issue_10.py
Normal file
26
llvm/tests/test_issue_10.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import unittest
|
||||
from llvm.core import (Module, Type, Builder)
|
||||
from .support import TestCase, tests
|
||||
|
||||
class TestIssue10(TestCase):
|
||||
def test_issue10(self):
|
||||
m = Module.new('a')
|
||||
ti = Type.int()
|
||||
tf = Type.function(ti, [ti, ti])
|
||||
|
||||
f = m.add_function(tf, "func1")
|
||||
|
||||
bb = f.append_basic_block('entry')
|
||||
|
||||
b = Builder.new(bb)
|
||||
|
||||
# There are no instructions in bb. Positioning of the
|
||||
# builder at beginning (or end) should succeed (trivially).
|
||||
b.position_at_end(bb)
|
||||
b.position_at_beginning(bb)
|
||||
|
||||
tests.append(TestIssue10)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue