Ted Kremenek
e5c8092cc1
Merge pull request #4134 from apple/simplify-tests
...
Simplify Foundation tests that compare types
2016-08-08 23:47:59 -07:00
Dave Abrahams
b23af7ce3b
Merge pull request #4091 from apple/deprecate-indexable
...
Deprecate the Indexable protocols
2016-08-08 21:01:39 -07:00
Dmitri Gribenko
1425a9201d
Foundation tests: simplify some tests using the new expectEqual() assertions
2016-08-08 17:56:08 -07:00
Dmitri Gribenko
e3a32a7044
stdlib tests: coding style fixes
2016-08-08 17:49:42 -07:00
Dave Abrahams
8a73f0b98e
[stdlib] Change Indexable deprecation messages
...
It's important to let people know that, in contrast with existing
practice in other frameworks, we really are going to remove the
deprecated API, and soon.
2016-08-08 13:44:41 -07:00
Xiaodi Wu
f9435b9ce8
[stdlib] Restore MemoryLayout.*(ofValue:)
2016-08-08 10:46:37 -05:00
Dmitri Gribenko
1d6b08ba97
stdlib: share the Unicode dataset across different test files
2016-08-07 23:29:24 -07:00
Dave Abrahams
168047d0f0
Deprecate the Indexable protocols
...
Using them is always a mistake; the user should choose the corresponding
Collection protocol instead.
2016-08-07 22:20:27 -07:00
Dmitri Gribenko
987acd375d
stdlib: make tests rely on Array implementation details less
2016-08-07 14:20:36 -07:00
Dmitri Gribenko
88de90a92d
stdlib: fix incorrect distance measurement between UTF-16 indices
...
String.UTF16View.Index.distance(to:) was returning a negated result.
Fixes SR-1988.
2016-08-07 13:40:34 -06:00
Michael Ilseman
49e0685151
[noescape by default] drop superfluous @noescape from validation suite
2016-08-04 16:23:06 -07:00
Dmitri Gribenko
e0af6f9921
Convert CoreGraphics tests to StdlibUnittest
2016-08-04 10:36:43 -07:00
swift-ci
47fe3bd82c
Merge pull request #3945 from jckarter/foundation-overlay-post-0072
2016-08-04 09:50:05 -07:00
Dmitri Gribenko
2119a0e02a
Merge pull request #3993 from apple/spritekit-remove-redundant-tests
...
Remove redundant tests for SpriteKit
2016-08-04 09:38:14 -07:00
Joe Groff
62afa03eb9
Improve Foundation overlay to handle bridging subscripts and dictionary literals.
...
SE-0072 took implicit bridging conversions away, which regressed the ability to express NSDictionaries as dictionary literals and index them using literal keys. Address this by changing the signature of init(dictionaryLiteral:) to use Hashable and Any, and by replacing the subscript from Objective-C with one using _Hashable that does the bridging on the user's behalf. This largely restores the QoI of working with NS collections.
2016-08-04 08:42:36 -07:00
Dmitri Gribenko
48f852973b
Remove redundant tests for SpriteKit
...
These exact tests already exist in
validation-test/stdlib/SpriteKit.swift.
2016-08-04 02:04:08 -07:00
Dmitri Gribenko
5d13d2a079
Merge pull request #3985 from apple/stdlib-int-stride-tests
...
stdlib: add tests for Stride types on integers
2016-08-04 00:19:57 -07:00
Doug Gregor
47f01ee98d
Revert "Eliminate race in swift_bridgeErrorToNSError."
...
This reverts commit e07e88706d . The
crash came back, so there's obviously more I need to investigate here:
https://ci.swift.org/job/swift-PR-osx-smoke-test/881/testReport/junit/Swift(macosx-x86_64)/stdlib/ErrorProtocol_swift/
2016-08-03 23:48:33 -07:00
Dmitri Gribenko
ee773c787a
stdlib: add tests for Stride types on integers
2016-08-03 18:57:39 -07:00
Dmitri Gribenko
86741b9ca1
Merge pull request #3960 from apple/spritekit-fixes
...
SpriteKit overlay: add a better variant of the SKWarpGeometryGrid() initializer overlay
2016-08-03 18:20:25 -07:00
Doug Gregor
e07e88706d
Eliminate race in swift_bridgeErrorToNSError.
...
Huge thanks to John for noting that 'consume' didn't provide the
guarantees we wanted, and to Michael G. for getting a TSan build up
and running to identify/verify this race.
It's possible that this is overlay strict, and that we only need to
look at the domain to ensure that the code and userInfo are
visible. However, TSan seems to prefix the form in this patch, so
we'll be more conservative for now.
Fixes rdar://problem/27541751.
2016-08-03 15:21:15 -07:00
Dmitri Gribenko
c41a9b6341
SpriteKit overlay: add a better variant of the SKWarpGeometryGrid() initializer overlay
2016-08-03 11:41:55 -07:00
Mishal Shah
d28ff854b9
Update master to build with Xcode 8 beta 4, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs.
2016-08-02 11:47:10 -07:00
Jordan Rose
f42158b12e
Revert "[Sema] ban multi-arguments to tuple coercion" ( #3922 )
...
It breaks cases where there really is a single unlabeled argument of tuple type, like this:
let pairs = [(1, "A"), (2, "B")]
print(pairs.map { $0.0 })
2016-08-01 19:22:19 -07:00
Chris Williams
4caf64a223
Have FloatingPointConversion use float helper methods
2016-08-01 14:27:51 -07:00
Chris Williams
c8458cebc4
Create SwiftFloatingPointTypes for float-related helpers
2016-08-01 14:27:51 -07:00
Chris Williams
2f74e7618d
Add max/min helpers to SwiftIntTypes
2016-08-01 14:27:51 -07:00
Chris Williams
ae140e68a1
Tests for Float->Int Initializers
2016-08-01 14:27:51 -07:00
Nicole Jacque
65f933ea27
Disabling test until <rdar://problem/27541751> is resolved
2016-08-01 14:24:11 -07:00
Daniel Duan
c9b73dacc2
[Sema] ban multi-arguments to tuple coercion
...
Implements part of SE-0110. Single argument in closures will not be accepted if
there exists explicit type with a number of arguments that's not 1.
```swift
let f: (Int, Int) -> Void = { x in } // this is now an error
```
Note there's a second part of SE-0110 which could be considered additive,
which says one must add an extra pair of parens to specify a single arugment
type that is a tuple:
```swift
let g ((Int, Int)) -> Void = { y in } // y should have type (Int, Int)
```
This patch does not implement that part.
2016-07-31 16:22:57 -07:00
Robert Widmann
979ff4eee6
Merge pull request #3894 from CodaFi/string-cheese-to-go
...
Restore test lost in transition to String(describing:)
2016-07-31 14:00:48 -07:00
Dmitri Gribenko
bb6c6740ca
stdlib: fix a bug in ArraySlice.removeLast() when startIndex != 0
...
ArraySlice.removeLast() only worked when startIndex was equal to zero.
This change fixes the bug, and uses the proper customization point for
the algorithm.
Fixes SR-1791, rdar://problem/26897658.
2016-07-31 02:04:23 -07:00
Robert Widmann
f2165a6e64
Restore test lost in transition to String(describing:)
2016-07-30 18:14:00 -07:00
Robert Widmann
e1ae0391e8
Fixup validation tests
2016-07-30 03:50:16 -07:00
Dmitri Gribenko
382d215ad3
stdlib: SE-0101: remove the last few uses of old APIs (sizeof, alignof, strideof)
2016-07-30 00:38:18 -07:00
Joe Groff
c748ba6c12
Merge pull request #3870 from jckarter/no-bridged-default-literal-types
...
Sema: Don't try bridged classes as default literal types.
2016-07-29 22:16:53 -07:00
Robert Widmann
b79fa44da5
Merge pull request #3878 from CodaFi/decltype
...
[SE-0096] Implement type(of:)
2016-07-29 18:05:01 -07:00
Dave Abrahams
f06a9a1154
Merge 'origin/master' into new-integer-protocols
2016-07-29 17:52:49 -07:00
Doug Gregor
b9363fe6bd
[SE-0111] Enable SE-0111 by default.
2016-07-29 17:28:24 -07:00
Robert Widmann
4f465224ea
Polish off uses of dynamicType in tests
2016-07-29 16:59:14 -07:00
Dmitri Gribenko
99dffd7682
Merge pull request #3854 from rintaro/SE-0101-memorylayout
...
[SE-0101] Implement: Reconfiguring sizeof and related functions into a unified MemoryLayout struct - Part 1
2016-07-29 15:56:27 -07:00
Joe Groff
11f03cd8b5
Sema: Don't try bridged classes as default literal types.
...
One last bit of SE-0072. We shouldn't fall back to bridged classes in the absence of type context for literals anymore. By itself, this kind of hoses the use of literals with NS types, but I think we can get most of the QoI back with overlay changes I plan to propose following this.
2016-07-29 15:18:31 -07:00
Michael Ilseman
25ac879aea
[noescape by default] Fix benchmarks and incorporate feedback
...
Adds @escaping to internal benchmark code to fix it. References SR for
known limitation. Use stdlib coding style for arguments.
2016-07-29 13:49:08 -07:00
Michael Ilseman
ccda8f33d1
[noescape by default] Proliferate @escaping
...
Adds an explicit @escaping throughout the standard library, validation
test suite, and tests. This will be necessary as soon as noescape is
the default for closure parameters.
2016-07-29 13:48:07 -07:00
Maxim Moiseev
a99221bfde
[overlay] CryptoTokenKit ( #3859 )
...
This is work in progress
2016-07-29 12:39:37 -07:00
Rintaro Ishizaki
c6f4bcd01e
[SE-0101] MemoryLayout: Migrate testsuite and benchmarks
2016-07-30 03:11:45 +09:00
Arnold Schwaighofer
f41e626ff0
Merge pull request #3795 from aschwaighofer/fix_optimizebridgedswifttoobjccast
...
Fix _bridgeToObjectiveC lookup code in optimizeBridgedSwiftToObjCCast
2016-07-29 07:18:14 -07:00
Max Moiseev
28a252e33d
Operators compile
2016-07-29 13:31:21 +03:00
Dmitri Gribenko
e5db796212
Merge pull request #3843 from atrick/rawptr-convert
...
Remove "illegal" UnsafePointer casts from the stdlib.
2016-07-28 22:40:16 -07:00
Dmitri Gribenko
4bed3391f7
Merge pull request #3849 from kballard/data_iterator
...
Implement a custom Data.Iterator
2016-07-28 22:27:36 -07:00