[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
This commit is contained in:
Jonas Devlieghere
2025-02-09 11:16:18 -08:00
parent 3d140004c7
commit 4722200773
2 changed files with 9 additions and 17 deletions

View File

@@ -24,3 +24,12 @@ class TestSBCommandReturnObject(TestBase):
# 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")

View File

@@ -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")