aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py')
-rw-r--r--packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py b/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
index b67e53c30745..fe10120d497e 100644
--- a/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
+++ b/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
@@ -6,9 +6,9 @@ from __future__ import print_function
import os, time
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test import lldbutil
class ClassTypesTestCase(TestBase):
@@ -92,11 +92,8 @@ class ClassTypesTestCase(TestBase):
lldbutil.state_type_to_str(process.GetState()))
# The stop reason of the thread should be breakpoint.
- thread = process.GetThreadAtIndex(0)
- if thread.GetStopReason() != lldb.eStopReasonBreakpoint:
- from lldbsuite.test.lldbutil import stop_reason_to_str
- self.fail(STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS %
- stop_reason_to_str(thread.GetStopReason()))
+ thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+ self.assertIsNotNone(thread)
# The filename of frame #0 should be 'main.cpp' and the line number
# should be 93.
@@ -203,11 +200,8 @@ class ClassTypesTestCase(TestBase):
lldbutil.state_type_to_str(process.GetState()))
# The stop reason of the thread should be breakpoint.
- thread = process.GetThreadAtIndex(0)
- if thread.GetStopReason() != lldb.eStopReasonBreakpoint:
- from lldbsuite.test.lldbutil import stop_reason_to_str
- self.fail(STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS %
- stop_reason_to_str(thread.GetStopReason()))
+ thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+ self.assertIsNotNone(thread)
frame = thread.frames[0]
self.assertTrue (frame.IsValid(), "Got a valid frame.")