Chris Lattner
0aebc5da16
My diagnstics change agitated a validation test, grr.
2016-02-28 21:09:27 -08:00
Patrick Pijnappel
902443e526
[stdlib] Fix _isValidUTF8 tests
2016-02-29 08:05:41 +11:00
Patrick Pijnappel
e02d7e7350
[stdlib] Add tests for _isValidUTF8()
...
Replaces the tests for the removed _numTrailingBytes()
2016-02-28 22:18:21 +11:00
Daniel Duan
2bc78b8c09
[stdlib] update for 'inout' adjustment (SE-0031)
2016-02-26 12:02:29 -08:00
Dmitri Gribenko
a77104d459
Update tests after transcode() API changes
2016-02-25 20:31:23 -08:00
Dmitri Gribenko
836e7785f9
stdlib: UTF16.measure() => .transcodedLength()
2016-02-25 15:06:00 -08:00
Jordan Rose
b319e3da32
stdlib: Adjust to insert(contentsOf:at:) and append(contentsOf:)
...
instead of insertContents(of:at:) and appendContents(of:),
originally insertContentsOf(_:at:) and appendContentsOf(_:)
per internal discussion.
2016-02-25 12:50:39 -08:00
Jordan Rose
e4e9c71d8f
StdlibUnittest: Rename enum cases and static vars to match API guidelines.
2016-02-24 18:23:59 -08:00
Jordan Rose
f922084180
stdlib: Rename miscellaneous enum cases and static vars.
2016-02-24 17:46:14 -08:00
Jordan Rose
e45dfe09c6
stdlib: Rename 'Native'/'Cocoa' representations inside Dictionary/Set.
...
...and then because of a compiler bug (SR-806), rename the helper
properties to 'asNative' and 'asCocoa'.
None of this is API, so there is no migration information.
2016-02-24 17:46:12 -08:00
Jordan Rose
979e4a8e34
stdlib: Rename {Float,Double.CGFloat}.NaN to 'nan'
...
This follows the API guidelines and is consistent with the printed form.
'quietNaN' does not change, though.
2016-02-24 17:46:12 -08:00
Dmitri Gribenko
f3389273ba
stdlib: String indices: samePositionIn(_:) => samePosition(in:)
2016-02-24 16:29:27 -08:00
Chris Willmore
2ddb6106e4
stdlib: Audit API for Swift 3 preposition, first-arg label rules
...
This commit is the result of auditing the following files:
* StringBuffer.swift
* StringCharacterView.swift
* StringCore.swift
* StringInterpolation.swift.gyb
* StringLegacy.swift
2016-02-24 16:11:20 -08:00
Max Moiseev
bb3eaaf308
Merging in latest master
2016-02-24 15:10:25 -08:00
Max Moiseev
0490e86d01
[stdlib] strideTo/strideThrough => stride(to:...)/stride(through:...)
2016-02-24 09:56:10 -08:00
Dmitri Gribenko
d7e82519f5
stdlib: add argument labels to sort() implementation details
2016-02-24 08:52:18 -08:00
Dmitri Gribenko
391d1c34c2
Adjust SceneKit test for String API changes
2016-02-24 01:31:31 -08:00
Dmitri Gribenko
e18d70a913
Merge pull request #1415 from Jnosh/array-types-validation-tests
...
Run collection unit tests on array types
2016-02-23 20:47:44 -08:00
Dmitri Gribenko
097085e16f
stdlib: Sequence.lexicographicalCompare(_:) => .lexicographicallyPrecedes(_:)
2016-02-23 18:12:09 -08:00
Dmitri Gribenko
e81f99d7ea
stdlib: Sequence.startsWith() => .starts(with:)
2016-02-23 18:12:09 -08:00
Janosch Hildebrand
3c4bb1d657
[stdlib] Replace uses of ++ in validation tests
2016-02-24 01:59:18 +01:00
Jordan Rose
0205191e32
stdlib: SequenceType._initializeTo(_:) becomes _copyContents(initializing:)
2016-02-23 16:58:49 -08:00
Jordan Rose
40d5e349bb
stdlib: insertContentsOf(_:at:) becomes insertContents(of:at:)
2016-02-23 16:58:49 -08:00
Dave Abrahams
ece87787e0
stdlib: merge swift 3 UnsafePointer migrations
2016-02-23 15:45:45 -08:00
Dave Abrahams
64a5165ecf
stdlib: deinitializePointee(_) => deinitialize()
...
Tacking "Pointee" on just for unary operations (and especially
operations with an optional count) created inconsistency.
2016-02-23 15:34:20 -08:00
Dave Abrahams
d96b051d28
stdlib: initializePointee(_) => initialize(with:)
...
Tacking "Pointee" on just for unary operations (and especially
operations with an optional count) created inconsistency.
2016-02-23 15:15:23 -08:00
Janosch Hildebrand
4fba2ffbed
[stdlib] Run collection unit tests on array types
...
... and locate them with the RangeReplaceableCollectionType tests on the array types.
2016-02-24 00:00:33 +01:00
Max Moiseev
42d5f30d3a
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-api-guidelines
2016-02-23 14:45:21 -08:00
Max Moiseev
0b759a409c
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-23 14:26:14 -08:00
Dmitri Gribenko
f0633ce5a9
stdlib: Sequence.iterator() => .makeIterator()
2016-02-23 13:52:30 -08:00
Max Moiseev
52f0cf49b0
[stdlib] indexOf => index(of:)/index(where:)
2016-02-23 11:45:11 -08:00
Janosch Hildebrand
af69499a47
[stdlib] Expand subscript(_: Range) tests on MutableCollectionType
...
Add tests for replacing a slice with a slice of a different size.
2016-02-23 16:55:40 +01:00
Dmitri Gribenko
196188b9c8
stdlib: add 'to:' label to dump()
2016-02-22 18:16:38 -08:00
Max Moiseev
4b9eab6288
appendContentsOf => appendContents(of:)
2016-02-22 18:02:04 -08:00
Max Moiseev
481bcabcba
[stdlib] API naming guidelines applied to split and join
...
- `separator` label for first argument of `split`
- `join` and related types are renamed to `joined`
2016-02-22 15:43:33 -08:00
Max Moiseev
78ba5d5f3f
[stdlib] Requires in comments changed to Precondition
2016-02-19 18:57:26 -08:00
Max Moiseev
40b1a0b7e0
[stdlib] all sorts of require renamed back to precondition
2016-02-19 18:21:29 -08:00
Dmitri Gribenko
b90470e2fe
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-19 09:51:53 -08:00
Dmitri Gribenko
98561f6137
stdlib: joinWithSeparator(_:) => join(separator:)
2016-02-18 22:30:57 -08:00
Dmitri Gribenko
a73390c06d
stdlib tests: replace '__FILE__' and '__LINE__' with '#file' and '#line'
2016-02-18 18:48:29 -08:00
Dmitri Gribenko
0f36bec31f
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-18 16:41:35 -08:00
Dmitri Gribenko
65d840c0ae
stdlib: lowercase cases in Optional and ImplicitlyUnwrappedOptional
2016-02-18 00:40:33 -08:00
Dmitri Gribenko
dd75aed67a
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-17 14:40:05 -08:00
Dmitri Gribenko
0795970fa7
Merge pull request #1096 from mattrajca/master
...
Added an an overlay for IOKit that adds the kIOReturnError* constants
2016-02-17 09:11:25 -08:00
Brian Gesiak
42215042ae
[validation-test] More granular FixedPoint tests
...
`FixedPoint.swift.gyb` generates a massive amount of assertions:
one for each `Int` type (such as `UInt8` and `Int64`) as a source,
to one of each `Int` type as a destination, for each of 27 bit
patterns. By my math that's 8 * 8 * 27 == 1728 assertions.
As a result, when one of those assertions fails, it's difficult to
tell what went wrong.
Split each assertion into its own test case. This makes the test
take a little longer to run, but it produces much more valuable
output when it fails.
2016-02-16 12:03:49 -05:00
Dmitri Gribenko
0e1c488f9a
stdlib: print, debugPrint: 'toStream:' => 'to:'
2016-02-15 23:48:02 -08:00
Dmitri Gribenko
25cc2d5695
stdlib: add first argument labels to Set and Dictionary
2016-02-15 23:48:02 -08:00
Dmitri Gribenko
efaa39ea79
stdlib: add first argument labels and some other changes to conform to API guidelines
2016-02-15 23:47:54 -08:00
Max Moiseev
3a3984877a
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-15 15:43:34 -08:00
gregomni
10370a5c0f
Extend callee diagnoses to non-conforming complex args including generics.
...
Previously, type checking arguments worked fine if the entire arg was
UnresolvedType, but if the type just contained UnresolvedType, the
constraint system always failed via explicitly constraining to
unresolved.
Now in TypeCheckConstraints, if the solution allows for free variables
that are UnresolvedType, then also convert any incoming UnresolvedTypes
into variables. At worst, in the solution these just get converted back
into the same Unresolved that they started with.
This change allows for incorrect tuple/function type possibilities to
make it back out to CSDiag, where they can be more precisely diagnosed
with callee info. The rest of the changes are to correctly figure
out the failure info when evaluating more types of Types.
New diagnosis for a partial part of an arg type not confroming. Tests
added for that. Expected errors changed in several places where we
now get real types in the diagnosis instead of '(_)' unresolved.
2016-02-14 11:32:14 -08:00