Skip to content

Commit

Permalink
[lldb][test][redecl-completion] XFAIL currently unsupported tests w/ …
Browse files Browse the repository at this point in the history
…lazy method loading
  • Loading branch information
Michael137 committed Apr 18, 2024
1 parent ff8fdb9 commit 4397f63
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
class CommandLineExprCompletionTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True

@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
def test_expr_completion(self):
self.build()
self.main_source = "main.cpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,29 @@
import lldb
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.lldbtest import *

from lldbsuite.test.decorators import *

class ContextObjectTestCase(TestBase):
@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
def test_context_object_eval_function(self):
"""Tests expression evaluation of functions in context of an object."""
self.build()

(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
self, "// Break here", self.main_source_spec
)
frame = thread.GetFrameAtIndex(0)
for obj in "cpp_struct", "cpp_struct_ref":
obj_val = frame.FindVariable(obj)
self.assertTrue(obj_val.IsValid())

# Test functions evaluation
value = obj_val.EvaluateExpression("function()")
self.assertTrue(value.IsValid())
self.assertSuccess(value.GetError())
self.assertEqual(value.GetValueAsSigned(), 2222)


def test_context_object(self):
"""Tests expression evaluation in context of an object."""
self.build()
Expand Down Expand Up @@ -35,12 +55,6 @@ def test_context_object(self):
self.assertSuccess(value.GetError())
self.assertEqual(value.GetValueAsSigned(), 1111)

# Test functions evaluation
value = obj_val.EvaluateExpression("function()")
self.assertTrue(value.IsValid())
self.assertSuccess(value.GetError())
self.assertEqual(value.GetValueAsSigned(), 2222)

# Test that we retrieve the right global
value = obj_val.EvaluateExpression("global.field")
self.assertTrue(value.IsValid())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class ImportStdModule(TestBase):
@add_test_categories(["libc++"])
@skipIfRemote
@skipIf(compiler=no_match("clang"))
@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
def test(self):
self.build()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def setUp(self):
self.main_source = "main.cpp"
self.main_source_spec = lldb.SBFileSpec(self.main_source)

@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
def test_issue35310(self):
"""Test invoking functions with non-standard linkage names.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def setUp(self):
self.source = "main.mm"
self.line = line_number(self.source, "// set breakpoint here")

@expectedFailureAll(setting=('plugin.typesystem.clang.experimental-redecl-completion', 'true'))
@skipUnlessDarwin
def test(self):
"""Test SBType APIs to fetch member function types."""
Expand Down

0 comments on commit 4397f63

Please sign in to comment.