Commit Graph

2011 Commits

Author SHA1 Message Date
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
Max Moiseev
28060f0fdf [stdlib][swift-3-indexing-model] fixing tests for Linux 2016-04-25 16:24:25 -06:00
Dmitri Gribenko
b75d2b9df4 Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-25 13:50:09 -07:00
Dave Abrahams
5fcb00364b Merge branch 'swift-3-indexing-model' of github.com:apple/swift into swift-3-indexing-model 2016-04-25 10:54:09 -07:00
Brian Gesiak
38741f3928 [test] Add Android (and FreeBSD) to OS checks
Add Android to the OS checks used to determine whether to import Glibc.
These tests would pass on Android were it not for the fact that Android is not
included in the Glibc check.

Also add FreeBSD where missing.
2016-04-25 10:58:32 -04:00
Dmitri Gribenko
8e886a3bdd stdlib: ranges: remove range protocols
The RangeProtocol was a very weak and fragile abstraction because it
didn't specify the interpretation of the endpoints.  To write a
non-trivial algorithm, one usually needed to consult that information.
The standard library code only actually worked correctly with half-open
and closed ranges (and didn't handle fully open ranges, for example).

The other two protocols, HalfOpenRangeProtocol and ClosedRangeProtocol,
were only used for code sharing, and present an ABI burden.  We can use
gyb instead.
2016-04-22 18:15:06 -07:00
Dave Abrahams
17cb21ea7e [stdlib] Move some test resources to StdlibCollectionUnittest 2016-04-22 17:59:58 -07:00
Dave Abrahams
99ac452766 [stdlib] Test additional limited index movement cases
The cases where the limit was in the opposite direction of the movement
were not being tested.  Also, bring back the explicit expected result.
Some things are not as trivial to compute correctly as they look.
2016-04-22 17:59:54 -07:00
Dmitri Gribenko
fc39950543 Remove an empty test 2016-04-22 16:35:00 -07:00
Dave Abrahams
c099c1a075 [stdlib] More precise testing for traps
Let's only detect the traps we're really interested in.
2016-04-22 16:15:31 -07:00
Dave Abrahams
4e4480ada5 [stdlib] More 80-column cleanups 2016-04-22 16:13:32 -07:00
Dave Abrahams
f9c8f3b69a [stdlib] Add test sanity
A number of factors were making it hard to tell what was being tested
here.  This commit improves naming, and stops explicitly specifying
expected results that can be trivially computed.
2016-04-22 16:09:10 -07:00
Dmitri Gribenko
54d81b6633 Rewrite tests for _copyToNativeArrayBuffer() default implementations to use StdlibCollectionUnittest infrastructure 2016-04-21 18:31:31 -07:00
Dave Abrahams
47a870cc50 [stdlib] Use location/formLocation for all index movement 2016-04-21 17:13:41 -07:00
Dmitri Gribenko
41e94ac655 stdlib: fix a bug in CountableClosedRange._customContainsEquatableElement() and add better tests for range types
The tests are still not thorough enough, but this is a start.
2016-04-21 14:00:18 -07:00
Austin Zheng
ac9049cbe6 Manually rebasing string diagnostic tests from @shawnce PR 1688 2016-04-18 17:52:56 -07:00