summaryrefslogtreecommitdiffstats
path: root/lldb/test/lang/objc/foundation/TestObjCMethods2.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-169/+0
| | | | | | | | | | | This is the conclusion of an effort to get LLDB's Python code structured into a bona-fide Python package. This has a number of benefits, but most notably the ability to more easily share Python code between different but related pieces of LLDB's Python infrastructure (for example, `scripts` can now share code with `test`). llvm-svn: 251532
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-271-1/+1
| | | | llvm-svn: 251444
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-231-0/+2
| | | | | | | | | | | | | Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
* Update every test to import `lldb_shared`.Zachary Turner2015-10-221-7/+2
| | | | | | | | | | | | | | | | | | | | | This is necessary in order to allow third party modules to be located under lldb/third_party rather than under the test folder directly. Since we're already touching every test file anyway, we also go ahead and delete the unittest2 import and main block wherever possible. The ability to run a test as a standalone file has already been broken for some time, and if we decide we want this back, we should use unittest instead of unittest2. A few places could not have the import of unittest2 removed,because they depend on the unittest2.expectedFailure or skip decorators. Removing all those was orthogonal in spirit to the purpose of this CL, so the import of unittest2 remains in those files that were using it for its test decorators. Those can be addressed separately. llvm-svn: 251055
* Merge dwarf and dsym testsTamas Berghammer2015-09-301-83/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently most of the test files have a separate dwarf and a separate dsym test with almost identical content (only the build step is different). With adding dwo symbol file handling to the test suit it would increase this to a 3-way duplication. The purpose of this change is to eliminate this redundancy with generating 2 test case (one dwarf and one dsym) for each test function specified (dwo handling will be added at a later commit). Main design goals: * There should be no boilerplate code in each test file to support the multiple debug info in most of the tests (custom scenarios are acceptable in special cases) so adding a new test case is easier and we can't miss one of the debug info type. * In case of a test failure, the debug symbols used during the test run have to be cleanly visible from the output of dotest.py to make debugging easier both from build bot logs and from local test runs * Each test case should have a unique, fully qualified name so we can run exactly 1 test with "-f <test-case>.<test-function>" syntax * Test output should be grouped based on test files the same way as it happens now (displaying dwarf/dsym results separately isn't preferable) Proposed solution (main logic in lldbtest.py, rest of them are test cases fixed up for the new style): * Have only 1 test fuction in the test files what will run for all debug info separately and this test function should call just "self.build(...)" to build an inferior with the right debug info * When a class is created by python (the class object, not the class instance), we will generate a new test method for each debug info format in the test class with the name "<test-function>_<debug-info>" and remove the original test method. This way unittest2 see multiple test methods (1 for each debug info, pretty much as of now) and will handle the test selection and the failure reporting correctly (the debug info will be visible from the end of the test name) * Add new annotation @no_debug_info_test to disable the generation of multiple tests for each debug info format when the test don't have an inferior Differential revision: http://reviews.llvm.org/D13028 llvm-svn: 248883
* Fix a test case which was failing. There was no actual problem in the test ↵Enrico Granata2015-09-221-1/+1
| | | | | | logic, just a cosmetic issue with the presentation of the result by Foundation llvm-svn: 248339
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-011-6/+6
| | | | | | with all the other assertion messages. llvm-svn: 241212
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-271-6/+6
| | | | | | | | | | | | | | | | | | | | | Summary: Before: AssertionError: False is not True : Process is launched successfully After: AssertionError: False is not True : Command 'run a.out' failed. >>> error: invalid target, create a target using the 'target create' command >>> Process could not be launched successfully Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits, vharron Differential Revision: http://reviews.llvm.org/D9948 llvm-svn: 238363
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-301-1/+1
| | | | | | | | | | | | | | | | against remote platform. Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if / unless the target platform is in the provided platform list. Test Plan: ninja check-lldb shows no regressions. When running cross platform, tests which cannot run on the target platform are skipped. Differential Revision: http://reviews.llvm.org/D8665 llvm-svn: 233547
* Fixed the an objective C test case so it passes correctly.Greg Clayton2014-07-161-4/+4
| | | | | | | | Fixed the test case to use a runtime function prototype that will be correct ([NSString stringWithCString: "new"]) instead of one that won't (expression str = [NSString stringWithFormat: @"%cew", 'N']). The runtime doesn't track vararg functions correctly so we can't reconstitute the function correctly. Also fixed some expressions that used "str_id" whose type was "id" and do the necessary casting since "id" doesn't have any methods. llvm-svn: 213113
* Marked TestObjCMethods failing tests XFAIL, fixed cleanup code, removed ↵Todd Fiala2014-07-091-1/+0
| | | | | | | | | | | | now-passing expected failure markers. All tests matching '-p TestObjCMethods' now are marked correctly for MacOSX, and some error classes have been removed in cleanup code looking for files that might not exist due to previous failure. See http://llvm.org/bugs/show_bug.cgi?id=20267 llvm-svn: 212650
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-101-1/+1
| | | | | | | | | | "mydir" inside each test case. This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated. Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you. llvm-svn: 196985
* <rdar://problem/12362092>Enrico Granata2013-02-231-4/+2
| | | | | | | | The decorators @expectedFailure (plain and special-case like i386, clang, ...) are modified to optionally take a bugnumber argument If such an argument is specified, the failure report (or unexpected success report) will include the information passed in as part of the message This is mostly useful for associating failures to issue IDs in issue management systems (e.g. the LLVM bugzilla) llvm-svn: 175942
* <rdar://problem/12890171>Enrico Granata2013-01-291-1/+1
| | | | | | | | Providing a compact display mode for "po" to use where the convenience variable name and the pointer value are both hidden. This is for convenience when dealing with ObjC instances where the description often gets it right and the debugger-provided information is not useful to most people. If you need either of these, "expr" will still show them. llvm-svn: 173748
* <rdar://problem/12028723>Enrico Granata2013-01-091-1/+1
| | | | | | | | | | Adding useful formatting options to the expression (expr) command. As a side effect of this change, the -d option now supports the same three-values enumeration that frame variables uses (run, don't run, none) instead of a boolean like it did previously These options do not apply to print, p or po because these are aliased to not take any options. In order to use them, use expression or expr. llvm-svn: 171993
* This patch removes the SymbolFileSymtab support Sean Callanan2012-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | for reporting class types from Objective-C runtime class symbols. Instead, LLDB now queries the Objective-C runtime for class types. We have also added a (minimal) Objective-C runtime type vendor for Objective-C runtime version 1, to prevent regressions when calling class methods in the V1 runtime. Other components of this fix include: - We search the Objective-C runtime in a few more places. - We enable enumeration of all members of Objective-C classes, which Clang does in certain circumstances. - SBTarget::FindFirstType and SBTarget::FindTypes now query the Objective-C runtime as needed. - I fixed several test cases. <rdar://problem/12885034> llvm-svn: 170601
* Missed a few places where I didn't delete the obsolete (commented out) ↵Jim Ingham2012-09-221-19/+1
| | | | | | version of the breakpoint creation. llvm-svn: 164436
* Fix all the test case breakages caused by folks writing tests all over the ↵Jim Ingham2012-09-221-23/+30
| | | | | | | | place that depended explicitly on the output of "break set". Please don't do this sort of thing!!!!! llvm-svn: 164433
* <rdar://problem/11505459> Stripping off the object's type from the output of ↵Enrico Granata2012-08-091-1/+1
| | | | | | the 'po' command llvm-svn: 161592
* Add i386-only expectedFailure decorators for current ToT.Johnny Chen2012-05-151-0/+2
| | | | llvm-svn: 156855
* Changed some tabs to spaces to make Python likeSean Callanan2012-04-061-24/+24
| | | | | | this file. llvm-svn: 154222
* Second batch of adding @dsym_test/@dwarf_test decorators to existing test cases.Johnny Chen2012-04-061-0/+12
| | | | | | | Plus some minor cleanup of test method names. Third and final batch is coming. llvm-svn: 154197
* The "desired result type" code in the expressionSean Callanan2011-12-211-0/+28
| | | | | | | | | | | | | | | | | | | | | | parser has hitherto been an implementation waiting for a use. I have now tied the '-o' option for the expression command -- which indicates that the result is an Objective-C object and needs to be printed -- to the ExpressionParser, which communicates the desired type to Clang. Now, if the result of an expression is determined by an Objective-C method call for which there is no type information, that result is implicitly cast to id if and only if the -o option is passed to the expression command. (Otherwise if there is no explicit cast Clang will issue an error. This behavior is identical to what happened before r146756.) Also added a testcase for -o enabled and disabled. llvm-svn: 147099
* Updated Clang to take an enhancement to the waySean Callanan2011-12-161-0/+27
| | | | | | | | | | | | | | we handle Objective-C method calls. Currently, LLDB treats the result of an Objective-C method as unknown if the type information doesn't have the method's signature. Now Clang can cast the result to id if it isn't explicitly cast. I also added a test case for this, as well as a fix for a type import problem that this feature exposed. llvm-svn: 146756
* Added the ability to dereference an Objective-C objectSean Callanan2011-12-081-1/+28
| | | | | | | | | | | | | pointer to make the result of an expression. LLDB now dumps the ivars of the Objective-C object and all of its parents. This just required fixing a bug where we didn't distinguish between Objective-C object pointers and regular C-style pointers. Also added a testcase to verify that this continues to work. llvm-svn: 146164
* Move global_variables dir to lang/c and foundation dir to lang/objc.Johnny Chen2011-06-251-0/+157
llvm-svn: 133883
OpenPOWER on IntegriCloud