Add llvm_cbuilder tests

This commit is contained in:
Travis E. Oliphant 2012-11-10 18:56:02 -06:00
commit a52db30af8
14 changed files with 5 additions and 1 deletions

View file

@ -0,0 +1,17 @@
from llvm.core import *
from llvm_cbuilder import *
from llvm_cbuilder import shortnames as C
import unittest
class TestCstrCollide(unittest.TestCase):
def test_same_string(self):
mod = Module.new(__name__)
cb = CBuilder.new_function(mod, 'test_cstr_collide', C.void, [])
a = cb.constant_string("hello")
b = cb.constant_string("hello")
self.assertEqual(a.value, b.value)
if __name__ == '__main__':
unittest.main()