Dave Abrahams
dcd46ea6df
[stdlib] A system for concise testing of customization points.
...
This approach should help us massively reduce the amount of code it
takes to verify that the architecture of our protocols works as
expected. Pair-programmed with Dmitri Hrybenko.
Swift SVN r29752
2015-06-27 02:31:26 +00:00
Dmitri Hrybenko
d3dff3e3a5
stdlib: rename generic parameters from T to Element
...
... for EmptyGenerator and EmptyCollection.
Part of rdar://21429126
Swift SVN r29622
2015-06-24 20:41:53 +00:00
Dmitri Hrybenko
57d85f70d7
stdlib: eliminate redundant implementations of 'generate()'
...
Swift SVN r29617
2015-06-24 20:41:47 +00:00
Dave Abrahams
46e6f767c1
StdlibUnittest: debugDescription for MinimalSequence
...
Swift SVN r29478
2015-06-18 05:05:09 +00:00
Dmitri Hrybenko
8387fc45b5
StdlibUnittest: add a facility to activate autorelease pools only on platforms that don't implement the return-autoreleased optimization
...
Swift SVN r29295
2015-06-04 09:06:16 +00:00
Dmitri Hrybenko
918c61f8bb
stdlib: fix coding style in LifetimeTracked.swift
...
Swift SVN r29294
2015-06-04 09:06:09 +00:00
Greg Parker
48817b766e
[test] Add watchOS to StdlibUnittest.
...
Swift SVN r29228
2015-06-02 08:30:10 +00:00
Joe Groff
72d82d1808
Darwin/Glibc overlays: Conditionalize SIG_* tokens.
...
Darwin libc and glibc use different typedefs for the signal handler type, and SIG_HOLD has different values. Conditionalize the definitions in their respective overlays.
Swift SVN r28921
2015-05-22 17:02:00 +00:00
Jordan Rose
cb4a1ad009
StdlibUnittest: Add another silly type annotation to make compiles faster.
...
No intended functionality change.
Swift SVN r28851
2015-05-20 21:28:34 +00:00
Dmitri Hrybenko
fe239e3d03
stdlib: de-underscore sort() and partition() methods
...
Swift SVN r28839
2015-05-20 19:34:36 +00:00
Dmitri Hrybenko
53f3ccf850
stdlib: change CollectionType.count() into a property
...
Swift SVN r28829
2015-05-20 09:14:43 +00:00
Dmitri Hrybenko
308f966359
StdlibUnittest: use correct assertions in MinimalRandomAccessIndex
...
Swift SVN r28815
2015-05-20 03:01:01 +00:00
Dmitri Hrybenko
d80baf7e1e
stdlib: fix coding style
...
Swift SVN r28696
2015-05-18 04:37:28 +00:00
Slava Pestov
44efd2d777
MsgPack: use throw for backtracking instead of optionals
...
This is an experiment to play around with using 'try' for this type
of thing, as well as to catch bugs.
Swift SVN r28695
2015-05-18 02:38:41 +00:00
Dmitri Hrybenko
25d9a4fe32
stdlib: protocol extensions: de-underscore filter()
...
The API was adjusted according to the API review previously.
Swift SVN r28592
2015-05-15 00:37:01 +00:00
Chris Willmore
edce320567
Fix copy-paste error when detecting TVOS simulator environment in stdlib
...
unit tests.
Swift SVN r28546
2015-05-14 00:35:02 +00:00
Chris Willmore
9ac141e21b
Add TVOS device testing support to the Swift project:
...
* Add --tvos option to swift-ios-test utility
* Mark failing tests appropriately
* Add support for TVOS predicates to stdlib unit tests
<rdar://problem/19854476> Swift: TV OS Testing Support
Swift SVN r28543
2015-05-14 00:12:17 +00:00
Dmitri Hrybenko
843d8a4eb7
stdlib: protocol extensions: de-underscore map()
...
Swift SVN r28502
2015-05-13 01:58:46 +00:00
Dmitri Hrybenko
0d42ed3eb2
StdlibUnittest: provide explanatory output about failing crash tests
...
Swift SVN r28404
2015-05-10 23:17:44 +00:00
Chris Lattner
934bbd0a42
more stdlib hygiene
...
Swift SVN r28393
2015-05-10 06:35:15 +00:00
Chris Lattner
c1df892d47
improve stdlib hygiene a bit.
...
Swift SVN r28392
2015-05-10 02:55:18 +00:00
Dmitri Hrybenko
f46f16ae82
stdlib: implement new print() API
...
rdar://20775683
Swift SVN r28309
2015-05-08 01:37:59 +00:00
Ted Kremenek
9f9bb725cf
Rename '_ErrorType' to 'ErrorType'.
...
Swift SVN r28293
2015-05-07 21:59:29 +00:00
Dmitri Hrybenko
8b392eeea9
Revert "Remove Array.count, it is redundant with protocol extensions"
...
This reverts commit r28247 while we discuss the change.
Swift SVN r28292
2015-05-07 21:45:30 +00:00
Dmitri Hrybenko
10ab07ade5
Revert "Remove {Dictionary,Set,UnsafeMutableBufferPointer,UnsafeBufferPointer}.count"
...
This reverts commit r28248 while we discuss the change.
Swift SVN r28291
2015-05-07 21:45:28 +00:00
Dmitri Hrybenko
8ac6c7cf8f
Remove {Dictionary,Set,UnsafeMutableBufferPointer,UnsafeBufferPointer}.count
...
These APIs are redundant with APIs that come from protocol extensions.
Swift SVN r28248
2015-05-07 00:30:43 +00:00
Dmitri Hrybenko
58601fafc8
Remove Array.count, it is redundant with protocol extensions
...
Swift SVN r28247
2015-05-07 00:30:41 +00:00
Dmitri Hrybenko
c109ec9125
stdlib: protocol extensions: de-underscore count()
...
Swift SVN r28246
2015-05-07 00:30:38 +00:00
Dmitri Hrybenko
e253881b02
stdlib: protocol extensions: de-underscore indices
...
Swift SVN r28245
2015-05-07 00:30:35 +00:00
Dmitri Hrybenko
f76ca6243e
stdlib: protocol extensions: de-underscore indexOf()
...
Swift SVN r28244
2015-05-07 00:30:33 +00:00
Dmitri Hrybenko
275cfc0545
stdlib: protocol extensions: de-underscore underestimateCount()
...
Swift SVN r28240
2015-05-07 00:30:28 +00:00
Dmitri Hrybenko
035d72d5a7
stdlib: protocol extensions: de-underscore contains()
...
Swift SVN r28236
2015-05-07 00:30:24 +00:00
Dmitri Hrybenko
822ad74194
stdlib: protocol extensions: de-underscore lexicographicalCompare()
...
Swift SVN r28235
2015-05-07 00:30:23 +00:00
Dmitri Hrybenko
78d1196f33
stdlib: protocol extensions: de-underscore elementsEqual
...
Swift SVN r28234
2015-05-07 00:30:22 +00:00
Dmitri Hrybenko
7e9063a4af
stdlib: protocol extensions: de-underscore enumerate()
...
Swift SVN r28231
2015-05-07 00:30:12 +00:00
Chris Lattner
37f5452d15
require -> guard.
...
Swift SVN r28223
2015-05-06 22:53:38 +00:00
Dmitri Hrybenko
cd652bf6cd
stdlib: canonicalize 'x.count == 0' to x.isEmpty
...
Swift SVN r28202
2015-05-06 16:27:41 +00:00
Dmitri Hrybenko
b6a662726b
stdlib: replace let-else by require-else
...
Swift SVN r28104
2015-05-04 00:29:48 +00:00
Chris Lattner
079e8b982b
move stdlib from let/else to require.
...
Swift SVN r28098
2015-05-03 21:45:06 +00:00
Dmitri Hrybenko
d72ae21e7c
When building the SDK overlay separately, build SwiftPrivate
...
SwiftPrivate is not installed in public releases of Xcode.
rdar://problem/20777797
rdar://problem/20780963
Swift SVN r28061
2015-05-02 00:24:12 +00:00
John McCall
ac50cbc801
Enable error-handling in import by default.
...
Swift SVN r28048
2015-05-01 20:35:28 +00:00
Chris Lattner
31c01eab73
Change the meaning of "if let x = foo()" back to Xcode 6.4 semantics. The compiler
...
includes a number of QoI things to help people write the correct code. I will commit
the testcase for it as the next patch.
The bulk of this patch is moving the stdlib, testsuite and validation testsuite to
the new syntax. I moved a few uses of "as" patterns back to as? expressions in the
stdlib as well.
Swift SVN r27959
2015-04-30 04:38:13 +00:00
Dave Abrahams
e2c6c7e90d
[stdlib] Fix "#" parameter warnings due to new rules
...
Swift SVN r27807
2015-04-27 18:15:34 +00:00
David Farler
9e28dc777a
Update standard library doc comments to Markdown
...
rdar://problem/20180478
Swift SVN r27726
2015-04-26 00:07:11 +00:00
Doug Gregor
5b767efe72
Fix three unintended API changes from the argument label defaults change.
...
Swift SVN r27705
2015-04-24 20:31:41 +00:00
Doug Gregor
793b3326af
Implement the new rules for argument label defaults.
...
The rule changes are as follows:
* All functions (introduced with the 'func' keyword) have argument
labels for arguments beyond the first, by default. Methods are no
longer special in this regard.
* The presence of a default argument no longer implies an argument
label.
The actual changes to the parser and printer are fairly simple; the
rest of the noise is updating the standard library, overlays, tests,
etc.
With the standard library, this change is intended to be API neutral:
I've added/removed #'s and _'s as appropriate to keep the user
interface the same. If we want to separately consider using argument
labels for more free functions now that the defaults in the language
have shifted, we can tackle that separately.
Fixes rdar://problem/17218256.
Swift SVN r27704
2015-04-24 19:03:30 +00:00
Chris Willmore
c7c7388cf2
Change do-while to repeat-while.
...
Change all uses of "do { ... } while <cond>" to use "repeat" instead.
Rename DoWhileStmt to RepeatWhileStmt. Add diagnostic suggesting change
of 'do' to 'repeat' if a condition is found afterwards.
<rdar://problem/20336424> rename do/while loops to repeat/while & introduce "repeat <count> {}" loops
Swift SVN r27650
2015-04-23 22:48:31 +00:00
Dmitri Hrybenko
af38ea1381
stdlib: add MutableCollectionType._prext_partition()
...
Swift SVN r27643
2015-04-23 20:52:00 +00:00
Chris Lattner
cd74bbd49b
convert some as? bindings in if/let patterns to use 'as' patterns, suggested by Joe. NFC.
...
Swift SVN r27628
2015-04-23 04:35:52 +00:00
Joe Groff
b812db06e4
Turn on C function pointer imports by default.
...
Update tests to match, and rewrite SwiftPrivatePthreadExtras to take advantage of native C function pointer support instead of hacking it up through a stub C++ library.
Swift SVN r27604
2015-04-22 21:11:31 +00:00