diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 | 
| commit | f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch) | |
| tree | 48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py | |
| parent | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff) | |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py')
| -rw-r--r-- | packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py | 18 | 
1 files changed, 15 insertions, 3 deletions
| diff --git a/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py b/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py index 8f1c3be22836..0cc9456af32e 100644 --- a/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py +++ b/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py @@ -8,6 +8,7 @@ import unittest2  import os, time  import lldb  from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import *  import lldbsuite.test.lldbutil as lldbutil  class BlocksTestCase(TestBase): @@ -21,9 +22,8 @@ class BlocksTestCase(TestBase):          # Find the line numbers to break at.          self.lines.append(line_number('main.c', '// Set breakpoint 0 here.'))          self.lines.append(line_number('main.c', '// Set breakpoint 1 here.')) -     -    @unittest2.expectedFailure("rdar://problem/10413887 - Call blocks in expressions") -    def test_expr(self): + +    def launch_common(self):          self.build()          exe = os.path.join(os.getcwd(), "a.out")          self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) @@ -35,6 +35,10 @@ class BlocksTestCase(TestBase):              lldbutil.run_break_set_by_file_and_line (self, "main.c", line, num_expected_locations=1, loc_exact=True)          self.wait_for_breakpoint() +     +    @skipUnlessDarwin +    def test_expr(self): +        self.launch_common()          self.expect("expression a + b", VARIABLES_DISPLAYED_CORRECTLY,              substrs = ["= 7"]) @@ -47,6 +51,14 @@ class BlocksTestCase(TestBase):          # This should display correctly.          self.expect("expression (int)neg (-12)", VARIABLES_DISPLAYED_CORRECTLY,              substrs = ["= 12"]) + +    @skipUnlessDarwin +    def test_define(self): +        self.launch_common() + +        self.runCmd("expression int (^$add)(int, int) = ^int(int a, int b) { return a + b; };") + +        self.expect("expression $add(2,3)", VARIABLES_DISPLAYED_CORRECTLY, substrs = [" = 5"])      def wait_for_breakpoint(self):          if self.is_started == False: | 
