]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / packages / Python / lldbsuite / test / functionalities / frame-diagnose / inheritance / TestDiagnoseInheritance.py
1 """
2 Test the output of `frame diagnose` for calling virtual methods
3 """
4
5 from __future__ import print_function
6
7 import os
8 import lldb
9 from lldbsuite.test.decorators import *
10 from lldbsuite.test.lldbtest import *
11 from lldbsuite.test import lldbutil
12
13
14 class TestDiagnoseInheritance(TestBase):
15     mydir = TestBase.compute_mydir(__file__)
16
17     @skipUnlessDarwin
18     def test_diagnose_inheritance(self):
19         TestBase.setUp(self)
20         self.build()
21         exe = os.path.join(os.getcwd(), "a.out")
22         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
23         self.runCmd("run", RUN_SUCCEEDED)
24         self.expect("thread list", "Thread should be stopped",
25                     substrs=['stopped'])
26         self.expect("frame diagnose", "Crash diagnosis was accurate", "d")