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
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
practicalswift
15f88a4a39
[gardening] Fix header consistency for newly introduced header
2016-02-22 23:33:30 +01:00
Max Moiseev
675f457c3d
Introducing by argument label to Sequence.split
2016-02-22 12:00:27 -08:00
Brian Gesiak
e7c022679d
[stdlib] Rename "PrivateDarwin" to "PrivateLibc"
...
SwiftPrivateDarwinExtras is used by non-Darwin platforms as well; its
name is misleading. Rename it to SwiftPrivateLibcExtras, which is
closer to its actual function.
2016-02-22 11:07:24 -05: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
98561f6137
stdlib: joinWithSeparator(_:) => join(separator:)
2016-02-18 22:30:57 -08:00
Dmitri Gribenko
593b4cc3d6
stdlib: add first argument label to _failEarlyRangeCheck2()
2016-02-18 17:11:35 -08:00
Dmitri Gribenko
65d840c0ae
stdlib: lowercase cases in Optional and ImplicitlyUnwrappedOptional
2016-02-18 00:40:33 -08:00
Dmitri Gribenko
0e1c488f9a
stdlib: print, debugPrint: 'toStream:' => 'to:'
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
a558d13a3b
Revert "Replace Unmanaged with UnsafeReference"
...
This reverts commit d72932e931 .
2016-02-15 17:13:40 -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
Jordan Rose
a4a4a80ac4
[CMake] Don't pass -sil-serialize-all under SWIFT_STDLIB_ENABLE_RESILIENCE.
...
Thanks, Slava!
2016-02-10 10:29:01 -08:00
Max Moiseev
39fdbca8d0
making Swift build succesfully after the merge
2016-02-04 16:48:14 -08:00
Max Moiseev
61c837209b
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-04 16:13:39 -08:00
Chris Lattner
0619e57a61
Switch the stdlib to use #file instead of __FILE__, and deprecate the __FILE__ identifiers.
...
This also updates the tests that would otherwise fail.
2016-02-04 15:08:31 -08:00
David Farler
8a5ed405bf
Make var parameters an error for Swift 3
...
This finishes up revisions to SE-0003 - only var function parameters
are disallowed for Swift 3.
2016-01-30 12:39:17 -08:00
Dmitri Gribenko
a385779e41
stdlib: define a custom mirror for DictionaryGenerator and SetGenerator
...
The default mirror tries to access implementation details of the
generator, accessing the 'description' property of the storage, which is
an NSDictionary subclass. The default implementation of -[NSDictionary
description] tries to print the dictionary contents. But if the
Swift.Dictionary can't be bridged to NSDictionary, that causes a runtime
trap.
rdar://problem/24238609
2016-01-30 02:09:45 -08:00
Dmitri Gribenko
27f422fe39
StdlibUnittest: move logging wrappers for collections to StdlibCollectionUnittest
2016-01-29 19:38:37 -07:00
David Farler
3f635d04c7
Reinstante var bindings in refutable patterns, except function parameters.
...
This reverts commits: b96e06da44 ,
8f2fbdc93a ,
93b6962478 ,
64024118f4 ,
a759ca9141 ,
3434f9642b ,
9f33429891 ,
47c043e8a6 .
This commit leaves 'var' on function parameters as a warning to be
merged into Swift 2.2. For Swift 3, this will be an error, to be
converted in a follow-up.
2016-01-29 15:27:08 -08:00
Dmitri Gribenko
a5a70dd14c
StdlibUnittest: use ResettableValue more, removing error-prone boilerplate from tests
2016-01-29 13:24:59 -08:00
Slava Pestov
55644c1540
stdlib: Remove Self parameter from SequenceType._preprocessingPass
...
This code as written is not sound and should not type check
for non-final classes conforming to SequenceType (eg, NSArray).
Instead, capture the base of the call from the preprocess closure
passed in. The closure is @noescape, so it should be equivalent.
2016-01-29 12:18:39 -08:00
Dmitri Gribenko
fbbb42a5db
Merge pull request #1130 from glessard/noobjc-testpredicate
...
Add cases .ObjCRuntime and .NativeRuntime to StdlibUnittest's TestPredicate
2016-01-29 10:36:28 -08:00
Dmitri Gribenko
7368b08d86
Merge pull request #1133 from glessard/always-never-testpredicate
...
Add .Always and .Never cases to StdlibUnittest's TestPredicate
2016-01-28 23:19:55 -08:00
Guillaume Lessard
b7f19d6889
Add .Always and .Never cases to StdlibUnittest's TestPredicate
2016-01-28 23:03:00 -07:00
Dmitri Gribenko
a415ade5ae
Merge pull request #854 from an0/master
...
Add O(1) `contains()` implementation for Range with Comparable Element
2016-01-28 21:41:31 -08:00
Guillaume Lessard
6879dbd553
Add runtime-related cases to StdlibUnittest's TestPredicate
2016-01-28 20:16:11 -07:00
Doug Gregor
2a42664129
Use #selector in StdlibUnitTest's Foundation extras
2016-01-28 11:23:14 -08:00
Ling Wang
148c821d2c
Fix test failure
2016-01-28 09:35:00 -06:00
Ling Wang
29bd8cc1b5
Merge from upstream and resolve conflicts
2016-01-27 16:08:15 -06:00
practicalswift
4d683be9e0
[gardening] Fix recently introduced incorrect headers
2016-01-27 11:56:10 +01:00
Dmitri Gribenko
b2290992fa
Allow StdlibCollectionUnittest to be built on Linux and FreeBSD
2016-01-26 22:02:17 -07:00
Dmitri Gribenko
4c590585e0
Move Default* and Minimal* colections to StdlibCollectionUnittest
...
New StdlibUnittest build times:
* DebugAssert compiler and library: 50s
* ReleaseAssert compiler and library: 75s
2016-01-26 18:58:04 -08:00
Dmitri Gribenko
aeeb9c1325
Move collection testing code from StdlibUnittest to a new library
...
This brings down StdlibUnittest build time to 90 seconds with either
a DebugAssert or a ReleaseAssert compiler.
The new library, StdlibCollectionTests, is only built when running
validation tests.
2016-01-26 18:58:03 -08:00
Dmitri Gribenko
c497ea9da9
Revert "[SR-610][Stdlib] Use for-in to iterate over CollectionType elements"
2016-01-25 18:08:21 -08:00
Dmitri Gribenko
deac7566b0
CMake: remove stale comment
2016-01-25 17:19:58 -07:00
Károly Lőrentey
015004e3d5
[SR-610][stdlib] Use _initialize_to in _copyCollectionToNativeArrayBuffer
...
The Generator interface is specialized for iteration and is often faster than indexing.
Using _initialize_to results in a ~10% speedup for Dictionary. For collections with more complex iteration state (such as search trees with O(log(n)) indexing), this leads to a complexity class improvement.
This requires a small change to the testsuite, because the generate() method of Defaulted*RangeReplaceableSlice called Array(self), which now leads to infinite recursion.
https://bugs.swift.org/browse/SR-610
2016-01-25 19:47:43 +01:00
Trent Nadeau
160efd1023
Updated constraints and docs for popFirst/popLast. Added tests.
2016-01-23 18:01:06 +00:00
practicalswift
ca9e488f30
[gardening] Add "-*- swift -*-" to *.swift.gyb. Remove from *.swift.
2016-01-23 10:27:03 +01:00
Dmitri Gribenko
9bcd5a1056
Collection.length => .count
2016-01-22 18:41:19 -08:00
Erik Eckstein
716d0d7c17
Add a build option to compiler StdlibUnittest with -sil-serialize-all
...
This is the configurable version of 29214253e5
By default it's off.
2016-01-22 17:12:31 -08:00
Joe Pamer
5f29594cbf
Revert "Reinstate "Compile StdlibUnittest with -sil-serialize-all."""
...
This reverts commit 29214253e5 .
This change massively regresses test execution times for DebugAssert builds, where we won't currently benefit from this added validation.
Moving forward, we'll scope this exclusively to optimized builds.
2016-01-22 11:55:08 -08:00
Max Moiseev
70d346c083
[stdlib] test for negative count in RangeReplaceableCollection.init
2016-01-21 15:21:06 -08:00