aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
commit14f1b3e8826ce43b978db93a62d1166055db5394 (patch)
tree0a00ad8d3498783fe0193f3b656bca17c4c8697d /packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py
parent4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff)
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py')
-rw-r--r--packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py74
1 files changed, 63 insertions, 11 deletions
diff --git a/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py b/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py
index 7eb26a569867..83408e7b456e 100644
--- a/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py
+++ b/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py
@@ -5,14 +5,15 @@ Test lldb data formatter subsystem.
from __future__ import print_function
-
import datetime
-import os, time
+import os
+import time
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
+
class PrintObjectArrayTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@@ -33,14 +34,15 @@ class PrintObjectArrayTestCase(TestBase):
"""Test that expr -O -Z works"""
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
- lldbutil.run_break_set_by_file_and_line (self, "main.mm", self.line, num_expected_locations=1, loc_exact=True)
+ lldbutil.run_break_set_by_file_and_line(
+ self, "main.mm", self.line, num_expected_locations=1, loc_exact=True)
self.runCmd("run", RUN_SUCCEEDED)
# The stop reason of the thread should be breakpoint.
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['stopped',
- 'stop reason = breakpoint'])
+ substrs=['stopped',
+ 'stop reason = breakpoint'])
# This is the function to remove the custom formats in order to have a
# clean slate for the next test case.
@@ -52,9 +54,59 @@ class PrintObjectArrayTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
- self.expect('expr --element-count 3 --object-description -- objects', substrs=['3735928559', '4276993775', '3203398366', 'Hello', 'World', 'Two =', '1 ='])
- self.expect('poarray 3 objects', substrs=['3735928559', '4276993775', '3203398366', 'Hello', 'World', 'Two =', '1 ='])
- self.expect('expr --element-count 3 --object-description --description-verbosity=full -- objects', substrs=['[0] =', '3735928559', '4276993775', '3203398366', '[1] =', 'Hello', 'World', '[2] =', 'Two =', '1 ='])
- self.expect('parray 3 objects', substrs=['[0] = 0x', '[1] = 0x', '[2] = 0x'])
- self.expect('expr --element-count 3 -d run -- objects', substrs=['3 elements', '2 elements', '2 key/value pairs'])
- self.expect('expr --element-count 3 -d run --ptr-depth=1 -- objects', substrs=['3 elements', '2 elements', '2 key/value pairs', '3735928559', '4276993775', '3203398366', '"Hello"', '"World"'])
+ self.expect(
+ 'expr --element-count 3 --object-description -- objects',
+ substrs=[
+ '3735928559',
+ '4276993775',
+ '3203398366',
+ 'Hello',
+ 'World',
+ 'Two =',
+ '1 ='])
+ self.expect(
+ 'poarray 3 objects',
+ substrs=[
+ '3735928559',
+ '4276993775',
+ '3203398366',
+ 'Hello',
+ 'World',
+ 'Two =',
+ '1 ='])
+ self.expect(
+ 'expr --element-count 3 --object-description --description-verbosity=full -- objects',
+ substrs=[
+ '[0] =',
+ '3735928559',
+ '4276993775',
+ '3203398366',
+ '[1] =',
+ 'Hello',
+ 'World',
+ '[2] =',
+ 'Two =',
+ '1 ='])
+ self.expect(
+ 'parray 3 objects',
+ substrs=[
+ '[0] = 0x',
+ '[1] = 0x',
+ '[2] = 0x'])
+ self.expect(
+ 'expr --element-count 3 -d run -- objects',
+ substrs=[
+ '3 elements',
+ '2 elements',
+ '2 key/value pairs'])
+ self.expect(
+ 'expr --element-count 3 -d run --ptr-depth=1 -- objects',
+ substrs=[
+ '3 elements',
+ '2 elements',
+ '2 key/value pairs',
+ '3735928559',
+ '4276993775',
+ '3203398366',
+ '"Hello"',
+ '"World"'])