summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/two-files
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-09-01 09:12:37 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-09-01 09:12:37 +0000
commit29872606d220420d53fde7cc5e3bea15f8da62e7 (patch)
tree47d7a82ccea48a6dd10a2d8ecb6b3c3127724131 /lldb/packages/Python/lldbsuite/test/expression_command/two-files
parentadfdcb9c2652aeee585b9005fd6c67be06af8ea9 (diff)
downloadbcm5719-llvm-29872606d220420d53fde7cc5e3bea15f8da62e7.tar.gz
bcm5719-llvm-29872606d220420d53fde7cc5e3bea15f8da62e7.zip
[lldb] Restructure test folders to match LLDB command hierarchy
Summary: As discussed on lldb-dev, this patch moves some LLDB tests into a hierarchy that more closely resembles the commands we use in the LLDB interpreter. This patch should only move tests that use the command interpreter and shouldn't touch any tests that primarily test the SB API. Reviewers: #lldb, jfb, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: dexonsmith, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67033 llvm-svn: 370605
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/two-files')
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/two-files/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py41
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/two-files/foo.m28
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/two-files/main.m22
4 files changed, 0 insertions, 98 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/two-files/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/two-files/Makefile
deleted file mode 100644
index 5974461e256..00000000000
--- a/lldb/packages/Python/lldbsuite/test/expression_command/two-files/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../make
-
-OBJC_SOURCES := main.m foo.m
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation \ No newline at end of file
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py b/lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
deleted file mode 100644
index bac8e5453e4..00000000000
--- a/lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Regression test for <rdar://problem/8981098>:
-
-The expression parser's type search only looks in the current compilation unit for types.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCTypeQueryTestCase(TestBase):
-
- mydir = TestBase.compute_mydir(__file__)
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Find the line number to break for main.m.
- self.line = line_number(
- 'main.m', "// Set breakpoint here, then do 'expr (NSArray*)array_token'.")
-
- @skipUnlessDarwin
- def test(self):
- """The expression parser's type search should be wider than the current compilation unit."""
- self.build()
- self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
- lldbutil.run_break_set_by_file_and_line(
- self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
- self.runCmd("run", RUN_SUCCEEDED)
-
- # Now do a NSArry type query from the 'main.m' compile uint.
- self.expect("expression (NSArray*)array_token",
- substrs=['(NSArray *) $0 = 0x'])
- # (NSArray *) $0 = 0x00007fff70118398
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/two-files/foo.m b/lldb/packages/Python/lldbsuite/test/expression_command/two-files/foo.m
deleted file mode 100644
index 1609ebd838f..00000000000
--- a/lldb/packages/Python/lldbsuite/test/expression_command/two-files/foo.m
+++ /dev/null
@@ -1,28 +0,0 @@
-#import <Foundation/Foundation.h>
-
-NSMutableArray *
-GetArray ()
-{
- static NSMutableArray *the_array = NULL;
- if (the_array == NULL)
- the_array = [[NSMutableArray alloc] init];
- return the_array;
-}
-
-int
-AddElement (char *value)
-{
- NSString *element = [NSString stringWithUTF8String: value];
- int cur_elem = [GetArray() count];
- [GetArray() addObject: element];
- return cur_elem;
-}
-
-const char *
-GetElement (int idx)
-{
- if (idx >= [GetArray() count])
- return NULL;
- else
- return [[GetArray() objectAtIndex: idx] UTF8String];
-}
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/two-files/main.m b/lldb/packages/Python/lldbsuite/test/expression_command/two-files/main.m
deleted file mode 100644
index 3f5738314e6..00000000000
--- a/lldb/packages/Python/lldbsuite/test/expression_command/two-files/main.m
+++ /dev/null
@@ -1,22 +0,0 @@
-#import <Foundation/Foundation.h>
-#include <stdio.h>
-
-extern int AddElement (char *value);
-extern char *GetElement (int idx);
-extern void *GetArray();
-
-int
-main ()
-{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- int idx = AddElement ("some string");
- void *array_token = GetArray();
-
- char *string = GetElement (0); // Set breakpoint here, then do 'expr (NSArray*)array_token'.
- if (string)
- printf ("This: %s.\n", string);
-
- [pool release];
- return 0;
-}
OpenPOWER on IntegriCloud