Commit Graph

12 Commits

Author SHA1 Message Date
Doug Gregor
06c5e9cd5b Enable "omit needless words" by default.
Most of this is in updating the standard library, SDK overlays, and
piles of test cases to use the new names. No surprises here, although
this shows us some potential heuristic tweaks.

There is one substantive compiler change that needs to be factored out
involving synthesizing calls to copyWithZone()/copy(zone:). Aside from
that, there are four failing tests:

    Swift :: ClangModules/objc_parse.swift
    Swift :: Interpreter/SDK/Foundation_test.swift
    Swift :: Interpreter/SDK/archiving_generic_swift_class.swift
    Swift :: Interpreter/SDK/objc_currying.swift

due to two independent remaining compiler bugs:
  * We're not getting partial ordering between NSCoder's
  encode(AnyObject, forKey: String) and NSKeyedArchiver's version of
  that method, and
  * Dynamic lookup (into AnyObject) doesn't know how to find the new
  names. We need the Swift name lookup tables enabled to address this.
2015-12-11 14:46:50 -08:00
Jordan Rose
bfcc8482d8 Re-apply "[ClangImporter] Ban a few deprecated methods of NSDocument."
Now with the right REQUIRES line in the new test.

rdar://problem/21177341

Swift SVN r29237
2015-06-02 17:30:28 +00:00
Ted Kremenek
b2fa002ce4 Revert "[ClangImporter] Ban a few deprecated methods of NSDocument."
This is breaking the iOS testers.

Swift SVN r29227
2015-06-02 05:42:15 +00:00
Jordan Rose
ba8d1a5656 [ClangImporter] Ban a few deprecated methods of NSDocument.
...so that their modern NSError-based variants won't be imported using an
extra "error: ()" parameter. Apart from looking prettier, this avoids a
crash when overriding the "error: ()" versions, rdar://problem/21144509.

Once NS_REFINED_IN_SWIFT has been implemented we can probably use that instead.
Filed rdar://problem/21192039 to remove the hack at that point.

rdar://problem/21177341

Swift SVN r29212
2015-06-01 23:04:01 +00:00
Dmitri Hrybenko
f43843f25c tests: use the new substitution for the mock SDK
This is required to correctly use the mock SDK when the SDK overlay is
built and tested separately.  (Otherwise, the mock SDK might not get
used, because the overlay SDK options would expand from the
%-substitution, appear first on the command line, and shadow the mock
SDK in the search path).

Swift SVN r25185
2015-02-11 18:57:29 +00:00
Graham Batty
83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Dmitri Hrybenko
1eea220932 Use one module cache directory for all the lit tests to speed them up
Doing so is safe even though we have mock SDK.  The include paths for
modules with the same name in the real and mock SDKs are different, and
the module files will be distinct (because they will have a different
hash).

This reduces test runtime on OS X by 30% and brings it under a minute on
a 16-core machine.

This also uncovered some problems with some tests -- even when run for
iOS configurations, some tests would still run with macosx triple.  I
fixed the tests where I noticed this issue.

rdar://problem/19125022

Swift SVN r23683
2014-12-04 11:21:48 +00:00
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Doug Gregor
92aae25a7b Allow a failabile initializer spelled init! to satisfy a non-failable initializer requirement.
This is useful when making an Objective-C class conform to a Swift
protocol. Note that we can only implement this safely for non-@objc
protocols, where we have a witnes function that can perform the
checked unwrapping.

Swift SVN r21782
2014-09-08 19:58:36 +00:00
Doug Gregor
7c4b119829 Example Objective-C init methods from 'required' witness requirement.
Objective-C does not have a way to mark an init method as "required",
and required initializers cannot be added outside of a main class
definition. Therefore, allow Objective-C-defined initializers to be
used as witnesses when conforming to a protocol with an initializer
requirement.

Swift SVN r21781
2014-09-08 19:58:35 +00:00