mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
[python-bindings] Fixed 3 test failures caused by typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
22647a0783
commit
7400a858be
@ -125,8 +125,9 @@ class Module(LLVMObject):
|
|||||||
|
|
||||||
def print_module_to_file(self, filename):
|
def print_module_to_file(self, filename):
|
||||||
out = c_char_p(None)
|
out = c_char_p(None)
|
||||||
result = lib.LLVMPrintModuleToFile(self, filename, byref(out))
|
# Result is inverted so 0 means everything was ok.
|
||||||
if not result:
|
result = lib.LLVMPrintModuleToFile(self, filename, byref(out))
|
||||||
|
if result:
|
||||||
raise RuntimeError("LLVM Error: %s" % out.value)
|
raise RuntimeError("LLVM Error: %s" % out.value)
|
||||||
|
|
||||||
class Context(LLVMObject):
|
class Context(LLVMObject):
|
||||||
|
@ -37,7 +37,7 @@ class TestCore(TestBase):
|
|||||||
|
|
||||||
def test_create_module_with_name(self):
|
def test_create_module_with_name(self):
|
||||||
# Make sure we can not create a module without a LLVMModuleRef.
|
# Make sure we can not create a module without a LLVMModuleRef.
|
||||||
with self.assertRaises(RuntimeError):
|
with self.assertRaises(TypeError):
|
||||||
m = Module()
|
m = Module()
|
||||||
m = Module.CreateWithName("test-module")
|
m = Module.CreateWithName("test-module")
|
||||||
|
|
||||||
@ -49,7 +49,8 @@ class TestCore(TestBase):
|
|||||||
|
|
||||||
def test_module_getset_target(self):
|
def test_module_getset_target(self):
|
||||||
m = Module.CreateWithName("test-module")
|
m = Module.CreateWithName("test-module")
|
||||||
m.target = "thumbv7-apple-ios5.0.0"
|
target = "thumbv7-apple-ios5.0.0"
|
||||||
|
m.target = target
|
||||||
self.assertEqual(m.target, target)
|
self.assertEqual(m.target, target)
|
||||||
|
|
||||||
def test_module_print_module_to_file(self):
|
def test_module_print_module_to_file(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user