[Lldb-commits] [lldb] 4722200 - [lldb] Merge TestSBCommandReturnObject tests
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Sun Feb 9 11:17:06 PST 2025
Author: Jonas Devlieghere
Date: 2025-02-09T11:16:59-08:00
New Revision: 472220077383b2dbd9cfcaffcc6030558ba7a744
URL: https://github.com/llvm/llvm-project/commit/472220077383b2dbd9cfcaffcc6030558ba7a744
DIFF: https://github.com/llvm/llvm-project/commit/472220077383b2dbd9cfcaffcc6030558ba7a744.diff
LOG: [lldb] Merge TestSBCommandReturnObject tests
In #125132, Michael pointed out that there are now two tests with the
same name:
./lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
./lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py
Added:
Modified:
lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
Removed:
lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py
################################################################################
diff --git a/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py b/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
index f2dbbbd7b4d428e..2193b7270d0b491 100644
--- a/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
+++ b/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
@@ -24,3 +24,12 @@ def test_sb_command_return_object(self):
# return exit code 0 to indicate success. We can let this exception go
# - the test harness will recognize it as a test failure.
subprocess.check_call([self.driver_exe, self.driver_exe])
+
+ def test_get_command(self):
+ res = lldb.SBCommandReturnObject()
+ self.assertEqual(res.GetCommand(), "")
+
+ ci = self.dbg.GetCommandInterpreter()
+ ci.HandleCommand("help help", res)
+ self.assertTrue(res.Succeeded())
+ self.assertEqual(res.GetCommand(), "help help")
diff --git a/lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py b/lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py
deleted file mode 100644
index b0d0b7a8dfe4e72..000000000000000
--- a/lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SBCommandReturnObjectTest(TestBase):
- NO_DEBUG_INFO_TESTCASE = True
-
- def test(self):
- res = lldb.SBCommandReturnObject()
- self.assertEqual(res.GetCommand(), "")
-
- ci = self.dbg.GetCommandInterpreter()
- ci.HandleCommand("help help", res)
- self.assertTrue(res.Succeeded())
- self.assertEqual(res.GetCommand(), "help help")
More information about the lldb-commits
mailing list