Commit Graph

1226 Commits

Author SHA1 Message Date
Russ Bishop
f20c9255e9 Changes for code review 2016-05-14 16:57:00 -07:00
Russ Bishop
1d8edfa60f SR-1519: Add Sequence.first(predicate:) 2016-05-13 23:46:05 -07:00
Michael Gottesman
bddea630d9 Disable XCTest.swift until bot is upgraded.
(cherry picked from commit b617d6b8e78a458fc708d4cf422f44f508912c33)
2016-05-13 22:04:40 -07:00
Jacob Mizraji
f37c275c59 re-add symlink removed by ae2ddc9e94be9d5eef25279f9ce7dcd34c6392d4
(cherry picked from commit 909f8d61801363cf8e30f303f521cf94ccda7c6d)
(cherry picked from commit eba30d8c64526cc6b1b7443da302233edea7c82f)
2016-05-13 22:04:29 -07:00
Adrian Prantl
0fac43e11f Adapt to upstream LLVM changes.
<rdar://problem/25949511+25962000>

(cherry picked from commit df9dfac609d17cd26d6107f17024c937b1b5b1a2)
2016-05-13 22:04:00 -07:00
Max Moiseev
14470b11d0 [stdlib] moving the strideable test to where it belongs 2016-05-13 12:25:22 -07:00
Maxim Moiseev
5fe2a0232e [stdlib] Introducing MinimalStrideableIndex... (#2506)
... as well as new test collection types:
`MinimalRandomAccessCollectionWithStrideableIndex` and
`DefaultedRandonAccessCollectionWithStrideableIndex`, to test default
implementation of `index(...)` family of functions provided by the
standard library for the random access collections with strideable
indices.
2016-05-13 11:19:46 -07:00
Trent Nadeau
0cc851568a Updated tests to use @discardableResult and _ = . 2016-05-11 22:53:38 -04:00
Stephen Canon
772d7ec3c5 Merge branch 'SE-0067' of https://github.com/stephentyrone/swift into stephentyrone-SE-0067
Implements almost all of SE-0067. There are a few outstanding features; this implementation does not have:

- formRemainder(dividingBy:)
- formSquareRoot()
- addProduct(_:,_:)

which require additions to the Builtin module. I can probably figure out how to do these, but I haven't had a chance to do so yet. Also missing are the generic initializers and comparisons whose implementation depends on having new Integer protocols.

The last remaining feature of SE-0067 is that while the basic operators +,-,*,/, etc are moved onto the FloatingPoint protocol, they are still required on the concrete types in order to disambiguate overloads. Fixing this seems to require either modifying the overload resolution rules or removing these operators from some other protocols. Or it might just require that someone smarter than me looks at the problem.

Passes the existing tests locally (with the included changes). I'm working on additional tests for the new features.
2016-05-11 22:11:21 -04:00
Max Moiseev
4027afa536 [stdlib] fixing the signature of RandomAccessCollection.index(_:offsetBy:limitedBy:) and uncommenting the test 2016-05-11 17:27:49 -07:00
John McCall
e75dae491e Don't diagnose failures to call symmetrically-typed binary operators
as a failure to convert the individual operand, since the operator
is likely conceptually generic in some way and the choice of any
specific overload is probably arbitrary.

Since we now fall back to a better-informed diagnostics point, take
advantage of this to generate a specialized diagnostic when trying to
compare values of function type with ===.

Fixes rdar://25666129.

This reverts commit 073f427942,
i.e. it reapplies 35ba809fd0 with a
test fix to expect an extra note in one place.
2016-05-11 16:09:28 -07:00
Stephen Canon
6429eabf74 Implement the new FloatingPoint protocols from SE-0067.
There are a couple of features that are not yet implemented, because they require additions to the Builtin module.  Specifically, this implementation does not have:

- formRemainder(dividingBy:)
- formSquareRoot()
- addProduct(_:,_:)

Also missing are the generic initializers and comparisons whose implementation depends on having new Integer protocols.

The last remaining feature of SE-0067 is that while the basic operators +,-,*,/, etc are moved onto the FloatingPoint protocol, they are still required on the concrete types in order to disambiguate overloads.  Fixing this seems to require either modifying the overload resolution rules or removing these operators from some other protocols.  Or it might just require that someone smarter than me looks at the problem.

Passes all the existing tests (with the included changes).  I'm working on additional tests for the new features.
2016-05-09 10:34:13 -04:00
Ted Kremenek
d3c41c4668 Revert "Revert "SE-0072: Fully eliminate implicit bridging conversions from Swift"" (#2441) 2016-05-06 23:26:45 -07:00
Ted Kremenek
4df003c291 Revert "SE-0072: Fully eliminate implicit bridging conversions from Swift" (#2440) 2016-05-06 23:22:56 -07:00
Joe Pamer
58f7e1568d Fix copy/paste error in Set test. 2016-05-06 23:18:13 -07:00
Joe Pamer
94c85b26b1 Add explicit bridging conversions to test/stdlib/Set.swift 2016-05-06 22:58:53 -07:00
Joe Pamer
6af546e89e Merge pull request #2419 from apple/se-0072
SE-0072: Fully eliminate implicit bridging conversions from Swift
2016-05-06 22:14:13 -07:00
Joe Pamer
ca1b5256d1 Update another test for explicit bridging conversions. 2016-05-06 21:26:42 -07:00
Dmitri Gribenko
0562763c7b stdlib tests: remove unnecessary argument labels 2016-05-06 14:52:30 -07:00
Dmitri Gribenko
2b876c0da9 Merge pull request #2418 from apple/make-microstdlib-executable
Make the MicroStdlib test executable
2016-05-06 14:21:28 -07:00
practicalswift
68b148cfb1 [gardening] Fix recently introduced typos. 2016-05-06 20:31:38 +02:00
Dmitri Gribenko
1d23085a8b Make the MicroStdlib test executable 2016-05-06 12:12:36 -06:00
practicalswift
1a4cf40a30 [gardening] Fix recently introduced top of file headers. 2016-05-06 19:56:26 +02:00
Dmitri Gribenko
2565797e64 stdlib: significantly speed up a test by forcing the array comparison to be specialized, and remove non-determinism 2016-05-05 16:31:55 -06:00
Jacob Mizraji
e17bc326b2 Test fix for OpenCLSDKOverlay 2016-05-05 14:23:32 -07:00
Dmitri Gribenko
d8bb5efe75 stdlib: add tests for index movement in CollectionOfOne 2016-05-04 15:03:22 -07:00
Dmitri Gribenko
f82ca83a68 stdlib: CollectionOfOne: fixes for index movement and tests 2016-05-03 18:44:34 -07:00
Chris Willmore
4d540c2a24 Fix up missed test cases for SE-0054. 2016-05-03 14:59:58 -07:00
Mark Lacey
182b6dfb18 Merge remote-tracking branch 'origin/master' into master-next
Conflicts:
	tools/driver/CMakeLists.txt
	tools/swift-reflection-dump/swift-reflection-dump.cpp
2016-05-03 14:23:20 -07:00
Dmitri Gribenko
b6447d119c Merge pull request #2346 from austinzheng/validation-tests
Improving LazyFilterCollection tests with random data
2016-05-02 17:55:29 -07:00
Dave Abrahams
93dfc16626 [stdlib] More reliably avoid running duplicate tests
Removing the “checksAdded” parameter from collection unit tests and
simply sharing a global variable is a better way to go.  We don't
use threads at that level, so there's no thread safety issue, and we
already committed to globals when we introduced the logging wrappers.
2016-05-02 15:30:29 -07:00
Dave Abrahams
0d68b3a4af [stdlib] Generate RandomAccessCollection defaults
The defaults we were generating for Collection and
BidirectionalCollection didn't make any sense, because if you could do
that strideable arithmetic then you essentially had random access.
Instead we constrain the defaults to apply to RandomAccessCollection
where the Indices are a CountableRange.
2016-05-02 11:35:32 -07:00
Dmitri Gribenko
c594b1d331 EmptyCollection: fixes for index movement and more tests 2016-05-02 11:08:57 -07:00
Dave Abrahams
446657459f [stdlib] index(...) tests => StdlibCollectionUnittest
Moving the ones that can be applied generally into the unit testing
library.
2016-05-01 14:00:24 -07:00
practicalswift
4613b1712b Merge pull request #2359 from practicalswift/typo-fixes-20160501
[gardening] Fix recently introduced typos: "adavances" → "advances", etc. (10 typos)
2016-05-01 20:11:45 +02:00
practicalswift
540cb751ac [gardening] Fix recently introduced typo: "adavances" → "advances"
[gardening] Fix recently introduced typo: "compie" → "compile"

[gardening] Fix recently introduced typo: "consise" → "concise"

[gardening] Fix recently introduced typo: "dengerate" → "degenerate"

[gardening] Fix recently introduced typo: "encodeded" → "encoded"

[gardening] Fix recently introduced typo: "equvalent" → "equivalent"

[gardening] Fix recently introduced typo: "guaranted" → "guaranteed"

[gardening] Fix recently introduced typo: "overridde" → "override"

[gardening] Fix recently introduced typo: "subsquence" → "subsequence"

[gardening] Fix recently introduced typo: "substraction" → "subtraction"

[gardening] Fix recently introduced typo: "whiltespace" → "whitespace"
2016-05-01 20:07:18 +02:00
practicalswift
8e3ba900b0 [gardening] Fix recently introduced headers. 2016-05-01 12:59:13 +02:00
Max Moiseev
d00dddbdab [stdlib][swift-3-indexing-model] fixing the ReversedCollection/lazy test 2016-04-29 13:46:50 -07:00
Austin Zheng
706510febc Improving LazyFilterCollection tests with random data 2016-04-29 13:37:22 -07:00
Austin Zheng
e9c1db2c2d Completing LazyFilterCollections, adding tests for LazyFilterCollection
Changes:
- Added proper LazyFilterBidirectionalCollection support
- Added tests for LazyFilterCollection variants
2016-04-29 00:50:15 -07:00
Austin Zheng
e034946b45 Fixing index(where:) API test
Changes:
- Fixed a bug in the collection unit test exercising the index(where:) API
- Reenabled relevant LazyMapCollection tests
2016-04-28 20:04:39 -07:00
swift-ci
893d2b4489 Merge pull request #2330 from austinzheng/validation-tests 2016-04-28 18:29:46 -07:00
Dmitri Gribenko
069efee426 stdlib: SE-0065: change UnsafeBufferPointer.Indices to CountableRange<Int>
CountableRange is cheaper than DefaultRandomAccessIndices.
2016-04-28 17:13:55 -07:00
Dmitri Gribenko
42d9c81919 stdlib: SE-0065: make UnsafeMutableAudioBufferListPointer a random-access collection again 2016-04-28 17:13:55 -07:00
Austin Zheng
0e22ef62af Adding validation tests for LazyMapCollection 2016-04-28 15:32:06 -07:00
Dmitri Gribenko
75d9d9118c stdlib: check associated types of LazyMap and LazyFilter 2016-04-28 12:05:03 -07:00
Dave Abrahams
9bee5d182f [stdlib] location/formLocation => index/formIndex 2016-04-26 17:46:16 -07:00
Dave Abrahams
debde16e2c Merge set-api branch into swift-3-indexing-model 2016-04-26 15:56:42 -07:00
Dmitri Gribenko
4f68420ceb stdlib: add LazyFilterBidirectionalCollection to preserve traversal kind 2016-04-26 13:33:13 -07:00
Dmitri Gribenko
d2522170ac Fix the Range test in optimized mode 2016-04-26 11:15:49 -07:00