Commit Graph

612 Commits

Author SHA1 Message Date
Michael Gottesman
ab6a4f5249 Disable some failing tests.
rdar://33358110
2017-07-19 16:25:39 -07:00
Dave Abrahams
c497969987 [stdlib] Swift4 Modernizations Compatible with Swift 3.2 2017-07-14 17:54:33 -07:00
Robert Widmann
0cf1b52452 Treat Cygwin as a separate OS
Cygwin is considered a distinct target with a distinct ABI, environment
conditions, and data types.  Though the goal of the project is
native Windows integration with UNIX-likes, that is not compatible with
the idea that the platform can be ignored as Win-like enough to have the
existing os(Windows) condition apply.
2017-06-28 13:31:05 -07:00
Jordan Rose
2b415a3848 [StdlibUnittest] Avoid serializing references to ObjC runtime APIs.
Specifically, objc_setUncaughtExceptionHandler, whose nullability is
now annotated in Swift 4 mode when using the Xcode 9 SDKs. That means
it has a different signature in Swift 3 and Swift 4 mode, which means
that references from SIL will fail when deserialized in the other
mode. (The recovery support added in earlier commits doesn't cover
serialized SIL.)

This resulted in crashes when building with
-build-serialized-stdlib-unittest, which enables -sil-serialize-all /
"magic performance mode" when building the StdlibUnittest module like
it does the standard libarry.

None of this affects developer code, because developer code doesn't
serialize anything (if they're playing by the rules).
2017-06-15 11:14:12 -07:00
Dave Abrahams
2cb11675cf Merge pull request #9531 from apple/core-team-resolution-2017-05-10.1
Implementing resolutions of core team meeting 2017-05-10
2017-05-12 13:15:08 -07:00
Dave Abrahams
ddf7ad517f UnicodeScalar => Unicode.Scalar 2017-05-11 15:23:25 -07:00
Ben Cohen
c03b14e93f Revert "Merge pull request #9379 from airspeedswift/redundant-where"
95e9681d10
2017-05-11 11:43:54 -07:00
ben-cohen
e4af80d39c Remove redudant constraints to supress warnings 2017-05-07 11:30:01 -07:00
Greg Parker
9c80b23953 [stdlib] Make StdlibUnittest nullability-agnostic for ObjC runtime functions. 2017-04-28 18:08:41 -07:00
Max Moiseev
a2d3914e02 Disambiguating expectEqual for String/Substring 2017-04-26 12:31:22 -07:00
Max Moiseev
b1898ab768 Porting String APIs to Subtring and fixing some tests 2017-04-25 14:58:06 -07:00
Doug Gregor
13f6c79b2a [Stdlib] For Collections, the SubSequence of a Subsequence is SubSequence.
Part of ABI FIXME #99, this gives us some nice consistency that
ensures that slicing a SubSequence gives us another SubSequence. There
are two source-compatibility implications to this change:

* Collections now need to satisfy this property, which could not be
  expressed in Swift 3. There might be some Collections that don't
  satisfy this property, and will break with the Swift 4 compiler
  *even in Swift 3 compatibility mode*. Case in point...
* The Lazy collection types were formulated as a lazy collection of
  the base slice (e.g., LazyCollection<ArraySlice<T>>) rather than as
  a slice of the lazy collection (e.g.,
  Slice<LazyCollection<Array<T>>). The former doesn't meet the new
  requirements, so change to the latter.
2017-04-20 13:18:32 -07:00
Doug Gregor
29a15ce402 [Stdlib] Apply SE-0142 to fix ABI FIXME #92, part of ABI FIXME #99. 2017-04-19 23:15:33 -07:00
Doug Gregor
0dd1da35d4 [Stdlib] Use SE-0142 to address ABI FIXMEs #68, #89, #90, #91.
Address ABI FIXME #68 by using same-type constraints directly on an
associated type to describe the requirements on the Indices associated
type of the Collection protocol. ABI FIXMEs #89, #90, #91 are all in
StdlibUnittest, and provoke warnings once #68 is fixed, but it's nice
to clear them out.

Fixes SR-2121.
2017-04-19 23:15:32 -07:00
Max Moiseev
a3a3351bd8 Merge branch 'master' into new-integer-protocols 2017-04-10 15:41:13 -07:00
Greg Parker
cfee4d9c5e [runtime] Fix some casts of _SwiftValue (#8457)
* [runtime] Fix some casts of _SwiftValue.

* Allow _SwiftValue to be cast to NSObject by yielding the box object itself.
* Failed casts from NSDictionary containing _SwiftValue should not crash.

SR-4306, rdar://31197066
2017-04-10 14:31:35 -07:00
Daniel Duan
4e5dbed41a Test: use StdlibUnittest in BridgeNonVerbatim
Convert tests in BridgeNonVerbatim.swift to use StdlibUnittest.

Also add a function that compares references in StdlibUnittest.
2017-03-29 01:09:53 -07:00
Max Moiseev
2c9be47551 Merge branch 'master' into new-integer-protocols 2017-03-23 16:46:01 -07:00
Doug Gregor
ab5d88ec29 [Stdlib unit test] Eliminate redundant explicit constraints. 2017-03-22 17:35:14 -07:00
Max Moiseev
b9fb3badc8 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-03-22 12:30:24 -07:00
Doug Gregor
cad49e66c4 [Unit test library] Eliminate redundant conformance requirements. 2017-03-17 21:53:17 -10:00
Max Moiseev
835b8809d2 Merge branch 'master' into new-integer-protocols 2017-03-07 16:18:54 -08:00
therealbnut
a9618f8dab Fix swift build warning - 'default will never be executed' 2017-02-13 20:21:48 +11:00
Syo Ikeda
e2b03a98dd [gardening] Prefer Array(seq) over seq.map { $0 } 2017-02-04 10:37:22 +09:00
Max Moiseev
644ee19b60 [stdlibunittest] Correctly handling the case when no output is captured for a crash.
If we expect to see an empty string in the output after the crash, it
would fail in case output is empty.
2017-02-02 09:44:28 -08:00
Max Moiseev
d128ed42b0 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-19 14:16:32 -08:00
Han Sangjin
a8dec7fa43 [stdlib] Fixed for Cygwin
- CYGWIN symbol is used to distinguish Cygwin environment from other OS
  and other environment in Windows.
- Added windows and windowsCygnus to OSVersion in StdlibUnittest
2017-01-17 02:31:16 +09:00
Max Moiseev
aecccc7e48 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-09 17:38:04 -08:00
Ben Cohen
3bdada1773 Merge pull request #6506 from airspeedswift/im-not-warning-you-again
[stdlib] Squash various warnings
2017-01-06 16:51:06 -08:00
Max Moiseev
27889c6376 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2017-01-06 15:54:44 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Ben Cohen
4dc5eacef5 Merge branch 'master' into im-not-warning-you-again 2017-01-05 10:11:48 -08:00
JP Simard
65688bdc39 [gardening] replace unused closure parameters with '_' in stdlib source (#6522)
* replace unused closure parameters with '_' in stdlib source

* fold some _ closure arguments into line above

* fold more _ closure arguments into line above
2017-01-03 20:10:41 -07:00
JP Simard
ea5b665afa prefer '-> Void' over '-> ()'
Apple and the Swift community has settled on this style:
https://devforums.apple.com/message/1133616#1133616

> FWIW, we've recently decided to standardize on () -> Void
> (generally, () for parameters and Void for return types) across all of our
> documentation.
2016-12-31 17:55:19 -08:00
ben-cohen
c7785533a1 add FIXME for default: warning 2016-12-29 13:20:59 -08:00
Max Moiseev
3059b3cdd1 Merge branch 'master' into new-integer-protocols 2016-11-30 10:45:10 -08:00
Max Moiseev
70b2343626 Merge branch 'master' into new-integer-protocols 2016-11-28 15:25:01 -08:00
practicalswift
5bc293cc09 [gardening] Add missing licensing headers. 2016-11-28 21:40:06 +01:00
Dave Abrahams
1f19884c01 Assertion failures from StdlibUnittest dump their descriptions 2016-11-23 02:14:39 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Max Moiseev
c0d624f6e2 Minor improvements 2016-11-18 18:56:26 -08:00
practicalswift
17503b0d85 [gardening] Use American English. 2016-11-06 10:12:04 +01:00
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
Ben Cohen
fe4186b0b9 Supress various warnings in StdlibUnittest.swift.gyb 2016-10-06 16:14:26 -07:00
Ben Cohen
24dc2af4a9 supress unused loop counter warning (#5134) 2016-10-05 17:02:34 -07:00
Greg Parker
9666d8d39a [test] Add a timeout to runRaceTest(). Use it to limit test AtomicInt.swift. (#4815)
[test] Add a timeout to runRaceTest(). Use it to limit test AtomicInt.swift.

This cuts AtomicInt.swift's execution time from several hours to
about ten minutes on slow hardware and slow build configurations.
2016-09-19 21:46:25 -07:00
airspeedswift
ed5231b47c Numbered all FIXME(ABI) entries for tracking purposes. (#4868) 2016-09-19 16:41:41 -07:00
practicalswift
fa7fbdb8b0 [gardening] Remove redundant nil-initialization of optional variable
From the Swift documentation:

"If you define an optional variable without providing a default value,
 the variable is automatically set to nil for you."
2016-09-18 07:40:07 +02:00
Dmitri Gribenko
30509f1b64 StdlibUnittest: add an argument label to checkHashable
I think it improves readability of the callsite.
2016-09-15 10:20:09 -07:00
Dmitri Gribenko
a4af3e62c3 StdlibUnittest: remove 'expectEmpty()' and 'expectNotEmpty()' 2016-09-12 10:33:07 -07:00