Nate Cook
ad19d35b26
Disable StringAPI test on OS stdlib
...
These tests verify fixes in the stdlib post-5.9, which means
that they fail when tested on older versions of the stdlib.
Fixes rdar://114581543
2023-08-28 15:07:11 -05:00
Nishith Kumar M Shah
056b4943a3
Fix String.hasPrefix and String.hasSuffix when self and arg are in NFC form ( #67729 )
2023-08-23 11:23:59 -05:00
Max Desiatov
2b69325821
test/stdlib/StringAPI.swift: disable crashing tests on WASI
2023-07-22 14:38:04 +01:00
Karoy Lorentey
1bc3f797fe
[test][NFC] Fix typo
2023-01-30 17:17:16 -08:00
Karoy Lorentey
108bc0e7b2
[stdlib] Add String._isIdentical(to:)
...
rdar://104828814
2023-01-30 12:08:35 -08:00
Anthony Latsis
52ce15ee9d
Gardening: Migrate test suite to GH issues: stdlib
2022-09-22 03:21:39 +03:00
David Smith
9dd8d3ad1a
Actually slice things in _StringGutsSlice
2022-05-17 14:31:11 -07:00
Josh Soref
624a54b9cf
Spelling stdlib ( #42544 )
...
* spelling: abcdefghijklmnopqrstuvwxyz
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: clazz
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: collection
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: compressible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: constituent
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: contiguous
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: convertibility
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: element
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: enforce
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: exhaustive
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: exhausts
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: existential
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: facilitate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: ignored
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: incorporated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: intersection
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: laziness
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: misaligned
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: overhaul
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: preamble
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: precondition
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: replacement
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: trailing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: unambiguous
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: uncompressible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: world
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com >
2022-04-22 19:18:38 -07:00
Kuba (Brecka) Mracek
8b189d99e4
Turn off SWIFT_ENABLE_REFLECTION on the stdlib_minimal preset ( #39030 )
2021-09-12 18:54:53 -07:00
Michael Ilseman
ebbfd8c639
[string] Comparison bug fix: Kelvin
...
Unicode Kelvin sign normalizes to ASCII 'K', but our comparison logic
didn't handle this situation when the other side was single-byte all
ASCII. Fall back to the slow comparison path if the point of
difference between an all-ASCII string and a UTF-16 string falls on
such a non-ASCII-yet-normalizes-to-ASCII scalar (rare).
2018-04-23 17:45:04 -07:00
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