Commit Graph

20 Commits

Author SHA1 Message Date
Michael Ilseman
c3d9a22548 [test] Split CString API tests into other file; NFC 2018-03-13 15:32:20 -07:00
Ben Cohen
f9b3e14137 [stdlib] Use Swift-native Character iteration for hasPrefix/Suffix (#14390)
* Use Swift-native Character iteration for hasPrefix/Suffix

* Remove old tests for removed C shims
2018-03-12 17:41:55 -07:00
Lance Parker
0661de22a2 [stdlib]Un-revert string comparison (#14694)
Restore (un-revert) sting comparison, with fixes

More exhaustive testing of opaque strings, which consistently reproduces prior sporadic failure. Shims fixups. Some test tweaking.
2018-02-18 10:50:33 -08:00
Lance Parker
abe6a6d177 Revert string comparison (#14657) 2018-02-15 14:37:43 -08:00
Lance Parker
49bc1459ae Update string comparison tests 2018-02-14 15:44:11 -08:00
Ben Cohen
dcab9493ae Removed some warnings (#12753) 2017-11-30 15:12:56 -08:00
taylor swift
c85880899d implement SE 184: add allocation methods to Unsafe buffer pointers, drop all parameters from deallocation, adjust namings, and add repeated-value assignment methods 2017-11-17 21:28:03 -08:00
Dave Abrahams
3c6f0c3c67 [stdlib] Repair Substring -> String conversion 2017-07-26 16:02:18 -07:00
Dave Abrahams
c62cdf3dc0 [stdlib] Use minimal bits for stride for indices in String.UTF8View
Fixes <rdar://33276845>
2017-07-13 07:55:53 -07:00
Dave Abrahams
4f71d9e35c [stdlib] Spot fix for https://bugs.swift.org/browse/SR-5401
The simplest way to keep the string buffer alive is simply to always grab its
iterator, even if we're not going to use it.  Thanks @milseman for that idea and
@jckarter for the diagnosis help!
2017-07-11 14:58:29 -07:00
Maxim Moiseev
8876655f6b [stdlib] Reverting the String.init?(_: String) behavior (#9659) 2017-05-17 13:56:15 -07:00
Max Moiseev
12f8b390c1 [stdlib] Mark String.init?(_: String) obsoleted in Swift 4
It is still possible to get the same behavior by providing an explicit
type context, or in a generic code, but otherwise, `String("")!` will
not compile.
2017-05-13 11:45:26 -07:00
Max Moiseev
4dcc15b210 [stdlib] Adding a test case to catch missing failable initializer 2017-05-12 20:47:34 -07:00
Max Moiseev
109c213358 [stdlib] Prioritizing non-failing String.init_:String) 2017-05-10 15:58:00 -07:00
Max Moiseev
288eee0b1b [stdlib] New overload for joined()
Now that `String` conforms to the `BidirectionalCollection` protocol, in
the expression `let x = [""].joined()` the best matching overload for
`joined` is no longer the one returning `String`.

Fixes: <rdar://problem/31899440>
2017-05-01 12:41:57 -07:00
Max Moiseev
13da5f5c5f Removing warning in test 2017-04-26 12:31:35 -07:00
Maxim Moiseev
1c1b2b966d [stdlib] String : RangeReplaceableCollection & BidirectionalCollection (#8921)
* [stdlib] String : RangeReplaceableCollection & BidirectionalCollection

* Add source compatibility hack for Swift.max

* Add source compatibility hack for Swift.min

* Remove redundant conformance in benchmarks

* Fix stupid typo I thought I'd already pushed

* XFAIL testing now-redundant conformance

* XFAIL an IDE test for now
2017-04-23 20:04:54 -07:00
Dmitri Gribenko
30509f1b64 StdlibUnittest: add an argument label to checkHashable
I think it improves readability of the callsite.
2016-09-15 10:20:09 -07:00
Dmitri Gribenko
243a35cd65 Migrate callsites from 'expectEmpty()' to 'expectNil()' 2016-09-10 20:05:42 -07:00
Max Moiseev
9fc37efee4 [test] renaming test/1_stdlib to just test/stdlib 2016-09-01 16:51:43 -07:00