Arnold Schwaighofer
39389b9c09
[SE-0125] Remove isUniquelyReferenced and the NonObjectiveCBase class
...
We can express the same using the `isUniquelyReferencedNonObjC` API.
- Rename `isUniquelyReferencedNonObjC` to `isKnownUniquelyReferenced`.
- Cleanup `ManagedBufferPointer` by removing holdsUniqueOrPinnedReference` and
renaming `holdsUniqueReference` to `isUniqueReference`.
- No longer promise to return false from `isKnownUniquelyReferenced` for @objc
class instances.
SR-1962
rdar://21886410
2016-07-26 07:09:29 -07:00
Xin Tong
bbf86865d6
Change unicodescalar to failable
...
We were using a precondition which crashes the program when invalid input is
provided. We want to provide a way to gracefully check and handle invalid input
or shutdown the program if necessary.
SR-1930
2016-07-21 15:27:13 -07:00
Alexander Lash
9a4caf6c4b
[core] hasPrefix/hasSuffix consider the empty string a prefix/suffix of all strings.
2016-07-20 17:46:47 -07:00
Dmitri Gribenko
1d3f595955
stdlib: re-enable validation-test/stdlib/String.swift
2016-07-15 20:33:47 -07:00
Michael Gottesman
16143ca41f
Disable test to unbreak the build.
...
rdar://27381049
2016-07-15 15:08:54 -07:00
Dmitri Gribenko
ce94bd9cca
Merge pull request #3268 from natecook1000/nc-scalarindex-nocore
...
[stdlib] Remove _StringCore from UnicodeScalarIndex
2016-07-07 17:41:36 -07:00
Philippe Hausler
9b421c77ac
Testing fallout for fixing SR-1903
2016-07-05 13:11:53 -07:00
Nate Cook
202f84e7f4
[stdlib] Update String COW tests
...
Removing the _StringCore reference from string indices fixes
an extra reallocation when mutating a string with heap buffer
storage.
2016-07-02 23:16:28 -05:00
Saleem Abdulrasool
83901998c9
Port for PS4
...
Add support for the PS4 OS. Update the standard library and add a target unit
test.
2016-06-30 20:14:50 -07:00
Mishal Shah
87b7bcfd3e
Update master to build with Xcode 8 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs.
2016-06-14 14:53:55 -07:00
Austin Zheng
240460ba38
Adding tests for String's removeSubrange overloads
2016-06-08 09:35:14 -07:00
Austin Zheng
30ba084a70
Adding tests for String's replaceSubrange overloads for closed ranges
2016-06-08 01:01:00 -07:00
Austin Zheng
f92be08556
Adding tests for String's replaceSubrange overloads for non-closed ranges
2016-06-07 17:01:39 -07:00
Maxim Moiseev
38f7ec2a32
[stdlib] Fix the String.decodeCString for UTF16 and UTF32 ( #2681 )
...
[stdlib] Fix the `String.decodeCString` for UTF16 and UTF32
Resolves [SR-1578](https://bugs.swift.org/browse/SR-1578 ]
Essentially the problem was that `strlen` is not the right way of
obtaining a length of anything but null-terminated UTF-8 sequence of
characters. Other encodings require alternative mechanisms.
2016-05-25 15:51:10 -07:00
Maxim Moiseev
eb7c39b4f9
[stdlib] Add String.subscript(_: ClosedRange<Index>) ( #2653 )
...
Fixes [SR-1596](https://bugs.swift.org/browse/SR-1596 ).
2016-05-24 11:35:07 -07:00
Dave Abrahams
9bee5d182f
[stdlib] location/formLocation => index/formIndex
2016-04-26 17:46:16 -07:00
Dmitri Gribenko
b75d2b9df4
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-25 13:50: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
fc39950543
Remove an empty test
2016-04-22 16:35:00 -07:00
Dave Abrahams
47a870cc50
[stdlib] Use location/formLocation for all index movement
2016-04-21 17:13:41 -07:00
Austin Zheng
ac9049cbe6
Manually rebasing string diagnostic tests from @shawnce PR 1688
2016-04-18 17:52:56 -07:00
Dmitri Gribenko
fc8d62dfbb
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-18 14:40:06 -07:00
practicalswift
db452dcbe9
[gardening] "[ a, b ]" → "[a, b]"
2016-04-17 21:26:08 +02:00
practicalswift
c2107f456c
[gardening] "[ a, b ]" → "[a, b]" ( #2227 )
2016-04-17 21:02:18 +02:00
Dmitri Gribenko
10697f939f
Merge commit '510f29abf77e202780c11d5f6c7449313c819030' into swift-3-indexing-model
2016-04-14 13:45:27 -07:00
Max Moiseev
fee941fc00
[stdlib][swift-3-indexing-model] fixing usages of successor/predecessor that have recently became internal
2016-04-08 17:03:29 -07:00
Manav Gabhawala
7928140f79
[SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary
2016-04-06 20:21:58 -04:00
Dmitri Gribenko
3e8dd1fa7c
New indexing model: fix the validation-test/stdlib/String.swift test
2016-04-04 15:43:29 -07:00
Dmitri Gribenko
6985b958fd
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-04 11:42:17 -07:00
Slava Pestov
49c54870c1
Serialization: Auto-linking recursively walks modules imported from -sil-serialize-all modules
2016-04-01 12:21:36 -07:00
Dave Abrahams
cfcc21e395
Update successor/predecessor in validation tests
2016-03-28 17:07:52 -07:00
Max Moiseev
e48f452a2e
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-api-guidelines
2016-02-29 12:15:33 -08:00
Max Moiseev
a49dab6bf8
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-29 12:08:52 -08:00
Daniel Duan
2bc78b8c09
[stdlib] update for 'inout' adjustment (SE-0031)
2016-02-26 12:02:29 -08:00
Jordan Rose
b319e3da32
stdlib: Adjust to insert(contentsOf:at:) and append(contentsOf:)
...
instead of insertContents(of:at:) and appendContents(of:),
originally insertContentsOf(_:at:) and appendContentsOf(_:)
per internal discussion.
2016-02-25 12:50:39 -08:00
Jordan Rose
e4e9c71d8f
StdlibUnittest: Rename enum cases and static vars to match API guidelines.
2016-02-24 18:23:59 -08:00
Chris Willmore
2ddb6106e4
stdlib: Audit API for Swift 3 preposition, first-arg label rules
...
This commit is the result of auditing the following files:
* StringBuffer.swift
* StringCharacterView.swift
* StringCore.swift
* StringInterpolation.swift.gyb
* StringLegacy.swift
2016-02-24 16:11:20 -08:00
Jordan Rose
40d5e349bb
stdlib: insertContentsOf(_:at:) becomes insertContents(of:at:)
2016-02-23 16:58:49 -08:00
Max Moiseev
4b9eab6288
appendContentsOf => appendContents(of:)
2016-02-22 18:02:04 -08:00
Dmitri Gribenko
efaa39ea79
stdlib: add first argument labels and some other changes to conform to API guidelines
2016-02-15 23:47:54 -08:00
Max Moiseev
3a3984877a
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-15 15:43:34 -08:00
Guillaume Lessard
99b703e8a4
Improve xfail and skip with better test predicates
2016-02-05 10:21:44 -07:00
Max Moiseev
61c837209b
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-04 16:13:39 -08:00
Guillaume Lessard
de21de35d6
Make String validation tests runnable on Linux
...
Foundation-dependent tests are skipped.
2016-01-27 00:14:28 -07:00
Dmitri Gribenko
9bcd5a1056
Collection.length => .count
2016-01-22 18:41:19 -08:00
Max Moiseev
9a018bd77d
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-01-20 14:38:22 -08:00
Guillaume Lessard
d6571c645b
Replace ++ by "+= 1"
2016-01-20 07:45:54 -07:00
Guillaume Lessard
0f46bd465d
Unmutated vars changed to lets
2016-01-20 07:45:54 -07:00
Dmitri Gribenko
f6c00e8377
String: var lowercased, uppercased => func
2015-12-18 16:20:01 -08:00
Doug Gregor
2091e7f852
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words
2015-12-18 10:54:46 -08:00