Commit Graph

23 Commits

Author SHA1 Message Date
Alexis Laferrière
cd2dcca196 Tests: Disable ArrayBridge.swift.gyb when use_os_stdlib (rdar://132941962) 2024-07-31 17:13:36 -07:00
Hamish Knight
fcc123db77 [test] Disable stdlib/ArrayBridge.swift.gyb on arm64 2024-05-28 21:56:29 +01:00
David Smith
b81aec5c1a rdar://127199021, fix compatibility with apps that accidentally do [[[aSwiftArray class] new] mutableCopy] to work (#73728) 2024-05-20 12:06:05 -07:00
Anthony Latsis
52ce15ee9d Gardening: Migrate test suite to GH issues: stdlib 2022-09-22 03:21:39 +03:00
Karoy Lorentey
e2cfab4f28 [stdlib][test] Adopt availability macros in tests 2021-10-31 15:00:58 -07:00
Karoy Lorentey
9b91b88a78 [test] ArrayBridge: Add missing availability checks
Welp, the bogus precondition that was fixed in https://github.com/apple/swift/pull/37960 indeed doesn't entirely deploy back to previous OSes.

This makes sense -- bridging is generally not specialized.

rdar://82125353
2021-09-15 14:39:01 -07:00
Karoy Lorentey
466e26a872 [stdlib] Implement _copyContents on internal Array types
`_copyContents(initializing:)` is a core method of Sequence, and it is used surprisingly often to copy stuff out of sequences. Array’s internal types currently have explicit implementations of it that trap (to prevent a performance bug due to the default iterator-based implementation. This has proved a bad idea, as not all code paths that end up calling `_copyContents` have actually been expunged — so we replaced a performance bug with a catastrophic correctness bug. 😥

Rather than trying to play whack-a-mole with code paths that end up in `_copyContents`, replace the traps with (relatively) efficient implementations, based on the ancient `_copyContents(subRange:initializing)` methods that have already been there all this time.

This resolves https://bugs.swift.org/browse/SR-14663.

I expect specialization will make this fix deploy back to earlier OSes in most (but unfortunately not all) cases.
2021-06-16 13:47:00 -07:00
Arnold Schwaighofer
b31b7a9d8e Remove some UNSUPPORTED swift_test_mode_optimize_none_with_implicit_dynamic
rdar://51228899
2019-05-31 08:45:37 -07:00
Arnold Schwaighofer
e113ef8c93 Add a mode to test implicit dynamic with private imports 2019-03-20 14:34:01 -07:00
Ben Cohen
6f91a4e3dd [stdlib] Migrate remaining stdlib tests from Swift 3 (#18740)
* Migrate remaining stdlib tests from Swift 3

* Fix misprunt

* Remove seemingly pointless loops
2018-08-16 08:44:04 -06:00
Arnold Schwaighofer
2d8a1dbbfe Codesign test/stdlib 2018-08-10 06:58:40 -07:00
Slava Pestov
5d2752f7d2 Run tests with -swift-version 4 by default
Some test now fail, so add an explicit -swift-version 3.
2018-06-19 23:24:19 -07:00
Dmitri Gribenko
984210aa53 tests: replace '// RUN: rm -rf' '// RUN: mkdir' pairs with '%empty-directory(...)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
Syo Ikeda
e2b03a98dd [gardening] Prefer Array(seq) over seq.map { $0 } 2017-02-04 10:37:22 +09:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01: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
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02: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
practicalswift
3a4ee89034 [gardening] Use consistent formatting. 2016-09-17 12:12:49 +02:00
Dmitri Gribenko
c9041beea3 Migrate callsites from 'expectNotEmpty()' to 'expectNotNil()' 2016-09-10 20:05:43 -07:00
Dmitri Gribenko
243a35cd65 Migrate callsites from 'expectEmpty()' to 'expectNil()' 2016-09-10 20:05:42 -07:00
Joe Groff
8232d3355b Foundation overlay: Remove unnecessary precondition that array elements be ObjectiveCBridgeable.
This caused a crash when arrays were bridged from ObjC with `Any` or other non-bridged value type elements. Fixes rdar://problem/27905230.
2016-09-07 10:39:05 -07:00
Max Moiseev
9fc37efee4 [test] renaming test/1_stdlib to just test/stdlib 2016-09-01 16:51:43 -07:00