summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py
new file mode 100644
index 00000000000..58e47d9a79f
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py
@@ -0,0 +1,28 @@
+"""
+Test that we embed the swig version into the lldb module
+"""
+
+from __future__ import print_function
+
+"""
+import os
+import time
+import re
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test import lldbutil
+"""
+from lldbsuite.test.lldbtest import *
+
+class SwigVersionTestCase(TestBase):
+
+ mydir = TestBase.compute_mydir(__file__)
+ NO_DEBUG_INFO_TESTCASE = True
+
+ def test(self):
+ self.assertTrue(getattr(lldb, "swig_version"))
+ self.assertIsInstance(lldb.swig_version, tuple)
+ self.assertEqual(len(lldb.swig_version), 3)
+ self.assertGreaterEqual(lldb.swig_version[0], 1)
+ for v in lldb.swig_version:
+ self.assertGreaterEqual(v, 0)
OpenPOWER on IntegriCloud