Commit Graph

2015 Commits

Author SHA1 Message Date
Arnold Schwaighofer
4aecd0d74f Also fails on appletvos 2017-11-11 18:52:20 -08:00
Arnold Schwaighofer
bb32c67c79 Disable ModelIO test on ios
This test fails on the iphonesimulator x86_64

rdar://35490456
2017-11-11 17:26:28 -08:00
Nate Cook
dcf6e2b409 [stdlib] Fix FloatingPoint.init(exactly:) (#12739)
* [stdlib] Fix FloatingPoint.init(exactly:)

This initializer wasn't actually checking the exact conversion.

SR-4634, rdar://problem/31836766
2017-11-06 15:24:44 -08:00
Andrew Trick
b73352af7a Disable Unsafe[Raw]BufferPointer testing in optimized mode.
The optimized-build behavior of UnsafeBufferPointer bounds/overflow
checking cannot be tested. The standard library always compiles with debug
checking enabled, so the behavior of the optimized test depends on whether
the inlining heuristics decide to inline these methods. To fix this, we need
a way to force @_inlineable UnsafeBufferPointer methods to be emitted inside
the client code, and thereby subject the stdlib implementation to the test
case's compile options.
2017-10-19 21:12:09 -07:00
Greg Parker
f1fda3cd0d [test] Temporarily XFAIL two UnsafeBufferPointer tests pending rdar://35052802. 2017-10-18 10:02:54 -07:00
Greg Parker
72c65ffcaf Revert "[stdlib] Fix FloatingPoint.init(exactly:) (#11311)"
This reverts commit c9f4df84f6.
It is causing test failures on 32-bit iOS simulator and on Linux.
2017-10-18 01:17:08 -07:00
Nate Cook
c9f4df84f6 [stdlib] Fix FloatingPoint.init(exactly:) (#11311)
* [stdlib] Fix FloatingPoint.init(exactly:)

This initializer wasn't actually checking the exact conversion. Corrects
the tests as well.
2017-10-17 13:52:11 -05:00
Ben Cohen
e3a4ca22d5 [stdlib] Implement slice Indices using their base Indices (#12277)
* Implement slice Indices using their base Indices

* Fix expected type test for Slice
2017-10-05 10:46:04 -07:00
Doug Gregor
797df6e8d7 Eliminate the _*Indexable protocols.
The various _*Indexable protocols only exist to work around the lack of
recursive protocol constraints. Eliminate all of the *_Indexable protocols,
collapsing their requirements into the corresponding Collection protocol
(e.g., _MutableIndexable —> Collection).

This introduces a number of extraneous requirements into the various
Collection protocols to work around bugs in associated type
inference. Specifically, to work around the lack of "global" inference
of associated type witnesses. These hacks were implicitly present in
the *Indexable protocols; I've made marked them as ABI FIXMEs here so
we can remove them when associated type inference improves.

Fixes rdar://problem/21935030 and a number of ABI FIXMEs in the library.
2017-10-01 15:08:23 -07:00
Doug Gregor
fb253b182a Use a more efficient SubSequence type for lazy map and filter.
Rather than using the default slice type when slicing the collection produced
by a lazy map or filter, slice the base collection and form a new
lazy map/filter collection from it. This allows any optimizations provided by
the collection SubSequence type to kick in, as well as ensuring that slicing
a lazy collection provides the same type as producing a lazy collection of a
slice.

This is technically source-breaking, because someone could have spelled out
the types of slicing a lazy filter or map… but it seems unlikely to matter
in practice and the benefits could be significant.

Fixes ABI FIXME’s #28 and #46.
2017-10-01 15:08:23 -07:00
Lance Parker
1c32c22304 Skip inconsistent ArrayNew tests 2017-09-27 12:52:07 -07:00
Karoy Lorentey
ed5b202c8f [stdlib] Implement -retainCount in _SwiftNativeNS*Base
Fixes rdar://problem/28002554.
2017-09-26 14:32:20 -07:00
Lance Parker
07b9232235 Correctly handle big endian systems, updated the comment for va_arg usage 2017-09-25 12:38:18 -07:00
Lance Parker
9fa2cc8192 removed uneeded compiler flags 2017-09-22 11:08:54 -07:00
Lance Parker
6056ebede1 Add tests for Bool’s conformance to CVarArg 2017-09-22 09:53:47 -07:00
Lance Parker
276f49af84 Merge pull request #11982 from lancep/comprehensiveArrayTests
[stdlib] Comprehensive array tests
2017-09-20 13:01:59 -07:00
Lance Parker
bd055412d2 Make the reserve capacity test use GT/GE rather than testing for a speicific value 2017-09-20 11:23:42 -07:00
Lance Parker
a386f747ed Removed more occurrences of the incorrect comment 2017-09-19 16:26:36 -07:00
Lance Parker
135b9b0a33 Max's feedback 2017-09-19 16:17:05 -07:00
Lance Parker
acf94f94ec Add -Onone to all the _Debug tests 2017-09-18 12:56:52 -07:00
Lance Parker
f000afea11 Removed debug parameters from build line 2017-09-18 11:55:30 -07:00
Lance Parker
6ff5310260 Moved helpers to a new file 2017-09-18 11:51:59 -07:00
Lance Parker
b484f59202 Iterator tests 2017-09-18 11:51:59 -07:00
Lance Parker
b67f38d940 Killed all the warnings in the Array tests 2017-09-18 11:51:59 -07:00
Lance Parker
36cfba3bfc Array casting tests 2017-09-18 11:51:59 -07:00
Lance Parker
d7a17bcd1f More Array bridging tests 2017-09-18 11:51:59 -07:00
Lance Parker
87e6485a15 Add bridging tests like Dictionary's 2017-09-18 11:51:46 -07:00
Robert Widmann
d0bc2a8611 Custom message for recursive Strideable witness
Strideable declares a default witness for Equatable and Comparable

extension Strideable {
  @_inlineable
  public static func < (x: Self, y: Self) -> Bool {
    return x.distance(to: y) > 0
  }

  @_inlineable
  public static func == (x: Self, y: Self) -> Bool {
    return x.distance(to: y) == 0
  }
}

This witness is implemented recursively because the expectation
is that Stride != Self.  However, it is possible to implement
SignedNumeric and Strideable together and inherit this conformance
which will cause undefined behavior - usually a crash.

Provide an overload when Stride == Self and crash with custom message
that mentions that Equatable and Comparable have to be implemented
in this case.

- It's better than nothing.
2017-09-15 12:31:09 -04:00
Mohammed M. Ennabah
81ab8a302d changed diagnostics argument name to argument label SR-5857 (#11894)
* changed diagnostics argument name to argument label SR-5857
2017-09-13 19:07:19 -07:00
Lance Parker
2ae14bbf24 Disable failing test on Linux 2017-09-07 11:09:38 -07:00
Lance Parker
df29438fb2 Merge pull request #11775 from lancep/SetSetAlgebraTests
[stdlib] Add tests for all of the SetAlgebra methods on Set
2017-09-07 10:10:57 -07:00
Lance Parker
7a37e9ee1d radar in comment 2017-09-06 22:22:04 -07:00
Lance Parker
2ba35ca2b1 Added test that ensures Set conforms to SetAlgebra 2017-09-06 14:11:55 -07:00
Lance Parker
e06a66587f Use .skip instead of commenting out the test 2017-09-06 10:48:49 -07:00
Lance Parker
787268c412 Disable test that's sometimes failing on Linux 2017-09-05 16:55:36 -07:00
Lance Parker
5644468a50 Add tests for all of the SetAlgebra methods on Set 2017-09-05 13:14:58 -07:00
swift-ci
92b13b809e Merge pull request #11664 from lancep/🐮Tests 2017-08-31 10:11:18 -07:00
Lance Parker
c049b14bfa Removed useless parts of Array tests 2017-08-30 22:32:07 -06:00
Maxim Moiseev
3a0dd61bc0 Merge pull request #11683 from lancep/optionSetTests
[stdlib] Add OptionSet tests
2017-08-30 10:23:44 -07:00
Lance Parker
27bd01a32d Fix bad find and replace 2017-08-29 17:29:50 -07:00
Lance Parker
77b0f39cc2 Max's feedback 2017-08-29 17:23:11 -07:00
Lance Parker
b8713a35d3 Max's review feedback 2017-08-29 16:11:12 -07:00
Lance Parker
ba3cbf9549 Add OptionSet tests 2017-08-29 15:25:13 -07:00
Kuba (Brecka) Mracek
d03a575279 Unify the capitalization across all user-visible error messages (#11599)
* Unify the capitalization across all user-visible error messages (fatal errors, assertion failures, precondition failures) produced by the runtime, standard library and the compiler.

* Update some more tests to the new expectations.
2017-08-29 12:16:04 -07:00
Lance Parker
19d43c24d1 Some more test cleanup 2017-08-28 22:49:19 -07:00
Lance Parker
3f60f1c80f Remove commented out code 2017-08-28 22:44:41 -07:00
Lance Parker
c623881c78 Fix Linux tests 2017-08-28 21:24:11 -07:00
Lance Parker
0ebb2fecca Add COW test for String 2017-08-28 17:20:19 -07:00
Lance Parker
3c8f5fa04a Add COW test for Array 2017-08-28 17:20:18 -07:00
Lance Parker
f42bd011cb Disable ArraySlice.append index test 2017-08-25 10:18:04 -07:00