aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2025-06-27 08:30:02 -0700
committerGitHub <noreply@github.com>2025-06-27 08:30:02 -0700
commit37b0b0f7d2b67fedd347a4011582802303657e69 (patch)
tree6a832eacbc435a8725292bed947eae2d9d6bfab5 /lldb/test/API/python_api
parenta460aa1071c90e849144a5ca2c11b3016e1dc2a0 (diff)
downloadllvm-37b0b0f7d2b67fedd347a4011582802303657e69.zip
llvm-37b0b0f7d2b67fedd347a4011582802303657e69.tar.gz
llvm-37b0b0f7d2b67fedd347a4011582802303657e69.tar.bz2
[lldb] Add class property for the version string (#145974)
Add a class property for the version string. This allows you to use access the version string through `lldb.SBDebugger.version` instead of having to call `lldb.SBDebugger.GetVersionString()`.
Diffstat (limited to 'lldb/test/API/python_api')
-rw-r--r--lldb/test/API/python_api/debugger/TestDebuggerAPI.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/test/API/python_api/debugger/TestDebuggerAPI.py b/lldb/test/API/python_api/debugger/TestDebuggerAPI.py
index 646ccce..43f45f3 100644
--- a/lldb/test/API/python_api/debugger/TestDebuggerAPI.py
+++ b/lldb/test/API/python_api/debugger/TestDebuggerAPI.py
@@ -286,3 +286,11 @@ class DebuggerAPITestCase(TestBase):
('remove bar ret', False), # remove_bar should fail, because it's already invoked and removed
('foo called', original_dbg_id), # foo should be called
])
+
+ def test_version(self):
+ instance_str = self.dbg.GetVersionString()
+ class_str = lldb.SBDebugger.GetVersionString()
+ property_str = lldb.SBDebugger.version
+
+ self.assertEqual(instance_str, class_str)
+ self.assertEqual(class_str, property_str)