Migrate to LLVM 2.6 (KS Sreeram) (Issue #25)

git-svn-id: http://llvm-py.googlecode.com/svn/trunk@83 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
mdevan.foobar 2009-10-28 06:02:04 +00:00
commit 5901f8d32b
9 changed files with 897 additions and 803 deletions

View file

@ -34,14 +34,17 @@ class TestModule(unittest.TestCase):
self.assertNotEqual(m.owner, None)
self.assertEqual(repr(m.owner), mp_repr)
m = None
self.assertEqual(gc.garbage, [])
# This doesn't work. Looks like there are leaks elsewhere
# too (unittest module?).
#gc.collect()
#self.assertEqual(gc.garbage, [])
# delete a module which was owned by a module provider that has
# gone out of scope
m2 = Module.new("test1.2")
temp_mp(m2)
del m2
self.assertEqual(gc.garbage, [])
#self.assertEqual(gc.garbage, [])
# delete a module provider object which owned a module that has
# gone out of scope
@ -97,7 +100,7 @@ class TestModule(unittest.TestCase):
self.assertEqual(r, 0)
r = m.add_type_name("typename41", Type.int())
self.assertEqual(r, 1)
reqd = "; ModuleID = 'test4.1'\n\t%typename41 = type i32\n"
reqd = "; ModuleID = 'test4.1'\n\n%typename41 = type i32\n"
self.assertEqual(str(m), reqd)
r = m.delete_type_name("typename41")
reqd = "; ModuleID = 'test4.1'\n"