Commit Graph

29 Commits

Author SHA1 Message Date
Chris Willmore
6f0a1adb0a stdlib: Update NSStringAPI.swift to match NSString under Swift 3 naming rules. 2016-02-23 17:52:00 -08:00
Max Moiseev
3a3984877a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-15 15:43:34 -08:00
Max Moiseev
55fde4c923 making tests pass 2016-02-10 16:08:40 -08:00
Nate Cook
56690e82f7 Add tests for string index IndexType conformance. 2016-02-05 21:03:40 -06:00
Max Moiseev
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -08:00
gregomni
e811a64af3 Further improvement of diagnoses on args to generic functions
If the mismatched argument is on an archetype param, check to see
whether the argument conforms to all of the protocols on the archetype,
using a specific does-not-conform diagnosis if one or more protocols
fail.

Also added another closeness class
`CC_GenericNonsubstitutableMismatch`, which happens when more than one
argument is a mismatch, but all the failing arguments are of the same
type and mismatch only because of substitutability. This closeness is
farther away than normal `CC_ArgumentMismatch` so that if we note
expected matches, we’ll prefer non-generic matches. But if this is the
result, we can still produce the specific conforms-to-protocol
diagnosis (since, in a sense, it’s only one type of argument that is
wrong even though it is multiple arguments).
2016-01-26 20:07:20 -08:00
Dmitri Gribenko
9bcd5a1056 Collection.length => .count 2016-01-22 18:41:19 -08:00
Doug Gregor
2091e7f852 Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words 2015-12-18 10:54:46 -08:00
Dmitri Gribenko
73ce9ae7e9 Collection.count => .length
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
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
Maxim Moiseev
844b81c46b SequenceType => Sequence 2015-12-09 17:16:56 -08:00
Chris Lattner
e078c8c276 add fixit checks to stdlib tests.
Swift SVN r31005
2015-08-04 20:32:11 +00:00
Joe Groff
e99d635c46 Combine deprecation tests into existing StringDiagnostics test.
Swift SVN r30405
2015-07-20 17:19:14 +00:00
Dmitri Hrybenko
de937eb0d1 stdlib: add unavailable String.{count,subscript()} APIs
The doc comments on these APIs are meant to steer the users toward the
right API for the use case.  Suggested by Anna Zaks.

Swift SVN r29615
2015-06-24 20:41:43 +00:00
Dmitri Hrybenko
fe239e3d03 stdlib: de-underscore sort() and partition() methods
Swift SVN r28839
2015-05-20 19:34:36 +00:00
Chris Lattner
e4b6afb9ae Start moving the testsuite to the "_ = foo()" idiom for evaluating an
expression but ignoring its value.  This is the right canonical way to do
this.  NFC, just testsuite changes.



Swift SVN r28638
2015-05-15 20:15:54 +00:00
Dmitri Hrybenko
61214ec55b stdlib: remove Sliceable conformance from String
Swift SVN r28442
2015-05-11 20:58:31 +00:00
Chris Lattner
4366da9250 more testcase updates for upcoming diagnostics change.
Swift SVN r28409
2015-05-11 06:05:00 +00:00
Chris Willmore
97011ee636 Update diagnostics in test/1_stdlib/StringDiagnostics.swift for r25104.
Swift SVN r25110
2015-02-10 02:24:30 +00:00
Maxwell Swadling
b1c233dad5 [stdlib] removed mixed string/nsstring operations
Related to rdar://problem/19169066

Swift SVN r25100
2015-02-09 21:05:33 +00:00
Maxwell Swadling
2eb96bafee [stdlib] reverted removal of mixed string type operators
Fixes rdar://problem/19656287

This reverts changes from r24931, r24911, r24760 and r24536.

Swift SVN r24938
2015-02-04 04:01:32 +00:00
Maxwell Swadling
a0cad601e1 [stdlib] removed mixed string type operators
Fixes rdar://problem/19656287

Swift SVN r24931
2015-02-04 00:56:36 +00:00
Maxwell Swadling
56026ee9f1 [stdlib] fixed ambiguous overloads
This fixes rdar://problem/19656287. This is a work around while we do
not have a way to remove implicit bridging conversions.
This means comparing a String and an NSString will use NSString
comparison.

Swift SVN r24911
2015-02-03 00:54:19 +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
Maxwell Swadling
4b9693d802 [stdlib] added test from rdar://problem/19169066
Swift SVN r24622
2015-01-22 00:47:49 +00:00
Maxwell Swadling
40884c7030 [stdlib] added tests for string operators flipped
Swift SVN r24575
2015-01-20 23:31:33 +00:00
Maxwell Swadling
661fde2ca6 [stdlib] removed ambiguous String comparison overloads
Fixes rdar://problem/19169066

Now that some implicit bridging conversions were removed, we can remove some of
the complex String comparison overloads. We could not remove all of them yet, as
String to NSString implicit bridging still exists. To work around this,
unavailable annotations were used. This ensures the user always gets the String
comparison function they intended.

Swift SVN r24536
2015-01-19 23:18:07 +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
Jordan Rose
e83c117c30 [test] Hack: run stdlib tests first to start long-running tests earlier.
This decreases total testing time by over a minute on my old Mac Pro.
It probably has much less effect on systems with fewer cores, but shouldn't
be any worse there.

Swift SVN r22745
2014-10-15 01:30:51 +00:00