Commit Graph

3253 Commits

Author SHA1 Message Date
Alejandro Alonso
4edc24189b Fix Lock and mark a few tests unsupported 2023-02-10 09:29:17 -08:00
Ben Barham
295a317a47 [Test] Ignore now-visible stdlib symbols
Last set of CentOS symbols.
2023-02-09 13:11:12 -08:00
swift-ci
5eb07d8c67 Merge remote-tracking branch 'origin/main' into rebranch 2023-02-09 08:33:12 -08:00
Mike Ash
11bcfd4d0c [Test] Mark test/stdlib/Reflection/PartialType.swift unsupported in freestanding builds. 2023-02-09 11:16:27 -05:00
Alejandro Alonso
38e9af48e4 Move some tests into our testsuite and various other fixes 2023-02-08 16:07:39 -08:00
swift-ci
1961e0762f Merge remote-tracking branch 'origin/main' into rebranch 2023-02-08 10:13:34 -08:00
Alejandro Alonso
acb7f8efda Implement generic signature checking for PartialType.create(with:) (#63496)
Check other constraints

some more fixes
2023-02-08 10:10:58 -08:00
Ben Barham
d563ef00e0 [Test] Remove symbol from visibility filter
`_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4nposE` was
accidentally added with the large set of CentOS symbols. Remove it - is
is visible in both all and no weak.
2023-02-06 16:56:49 -08:00
Ben Barham
32d6633b97 [Test] Filter out further symbols from CentOS 2023-02-06 09:50:49 -08:00
Ben Barham
978066e532 [Test] Filter out further symbols now visible on Linux
CentOS has a whole bunch of new std::string symbols that are now
visible. Filter them all out.
2023-02-03 15:53:04 -08:00
Ben Barham
b98ee678ea Merge pull request #63405 from bnbarham/filter-more-symbols
[Test] Filter further C++ standard library symbols
2023-02-02 21:26:23 -08:00
Ben Barham
9bfdccc550 [Test] Filter further C++ standard library symbols
205d68849e but for swiftCore as well (it
only filtered swiftRemoteMirror).
2023-02-02 21:25:03 -08:00
swift-ci
f621f935b2 Merge remote-tracking branch 'origin/main' into rebranch 2023-02-02 21:13:40 -08:00
Ben Barham
205d68849e [Test] Filter further C++ standard library symbols
Filters out further standard library symbols:
  - `basic_string::_M_replace`
  - `basic_string::reserve`
  - `basic_string::_M_mutate`
  - `basic_string std::operator+`
2023-02-02 13:06:54 -08: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
swift-ci
e0b16dbdf4 Merge remote-tracking branch 'origin/main' into rebranch 2023-01-25 16:07:15 -08:00
Valeriy Van
d2ad33ae93 test/stdlib: Fix memory leak in UnsafeRawBufferPointer test (#63182) 2023-01-25 09:37:16 +00:00
swift-ci
a69d7575ae Merge remote-tracking branch 'origin/main' into rebranch 2023-01-17 13:33:34 -08:00
swift-ci
03a15ddde8 Merge pull request #63032 from glessard/pr41608-followup
[test] add an omitted test
2023-01-17 13:17:05 -08:00
swift-ci
0d45a8816c Merge remote-tracking branch 'origin/main' into rebranch 2023-01-16 18:33:28 -08:00
Karoy Lorentey
1241df3fab [stdlib] String.debugDescription: Fix quoting behavior
`String.debugDescription` currently fails to protect the contents of
the string from combining with the opening or closing `”` characters
or one of the characters of a quoted scalar:

```swift
let s = “\u{301}A\n\u{302}B\u{70F}”
print(s.debugDescription)
// ⟹ “́A\n̂B܏”  (characters: “́, A, \, n̂, B, ܏”)
```

This can make debug output difficult to read, as string contents are
allowed to spread over and pollute neighboring meta-characters.

This change fixes this by force-quoting the problematic scalars in
these cases:

```swift
let s = “\u{301}A\n\u{302}B\u{70F}”
print(s.debugDescription)
// ⟹ “\u{301}A\n\u{302}B\u{70F}”
```

Of course, Unicode scalars that don’t engage in such behavior are
still allowed to pass through unchanged:

```swift
let s = “Cafe\u{301}”
print(s.debugDescription)
// ⟹ “Café”
```
2023-01-16 01:15:39 -08:00
Erik Eckstein
7ee2c105d5 tests: disable floating point conversion tests for the x86_64 simulator
There is a problem with 16-bit floating point conversions.

rdar://104232602
2023-01-16 09:58:23 +01:00
Guillaume Lessard
e346e24e3f [test] add an omitted test 2023-01-12 15:05:44 -08:00
Alexis Laferrière
4507307b35 Merge pull request #62982 from xymus/deser-safety-step2
[Serialization] Misc prep for the deserialization safety feature
2023-01-12 13:42:28 -08:00
Alexis Laferrière
32abd32ab3 [Test] Disable deserialization safety in test breaking access control 2023-01-11 15:11:11 -08:00
Karoy Lorentey
3f808f7311 Merge pull request #62897 from lorentey/character-recognizer-conformances
[stdlib] _CharacterRecognizer: Add Sendable, Equatable, CustomStringConvertible conformances
2023-01-09 11:33:23 -08:00
Ben Rimmington
2f8751c1ac [SE-0368] StaticBigInt: reorganize test methods (#62915) 2023-01-09 07:07:30 +00:00
Karoy Lorentey
2f1ed631e2 [stdlib] _CharacterRecognizer: Add Sendable, Equatable, CustomStringConvertible conformances
Equatability allows faster implementations for updating cached grapheme boundary state after a text mutation, because it enables quick detection of before/after state equality, without having to feed the recognizers until they produce a synchronized grapheme break.

The CustomStringConvertible conformance makes it orders of magnitude more pleasant to debug code that uses this.

Sendable is a baseline requirement for value types these days.
2023-01-06 14:51:37 -08:00
Karoy Lorentey
67f049ed10 [test] Reenable stdlib/StringIndex, requiring optimized_stdlib 2023-01-06 13:13:03 -08:00
Karoy Lorentey
2f0eab7fbf [test] Disable test/stdlib/StringIndex.swift to unblock CI 2023-01-05 17:45:26 -08:00
Karoy Lorentey
c94556165e Merge pull request #62794 from lorentey/character-recognizer
[stdlib] Export grapheme breaking facility
2023-01-04 23:54:48 -08:00
Karoy Lorentey
d358ece41d Merge pull request #62798 from lorentey/string-index-rounding
[stdlib] Expose index rounding entry points
2023-01-04 21:24:32 -08:00
Karoy Lorentey
4ffc5fe737 Merge pull request #62717 from lorentey/string-utf16-speedup
[stdlib] Speed up short UTF-16 distance calculations
2023-01-04 21:20:41 -08:00
Karoy Lorentey
fa2f63cae0 [stdlib] _CharacterRecognizer._firstBreak(inUncheckedUnsafeUTF8Buffer:startingAt:) 2023-01-03 21:00:01 -08:00
Karoy Lorentey
87422e5dc4 [stdlib] _CharacterRecognizer: Remove initializer argument 2023-01-03 20:59:24 -08:00
Stephen Canon
701a03b41e Remove prefix+ from StaticBigInt (#62733)
* Remove prefix+ from StaticBigInt

This operator causes source breakage in cases like:
```
let a:Int = 7
let b = +1
let c = a + b  // Error: Cannot convert `b` from `StaticBigInt` to `Int`
```
2023-01-03 19:30:01 -05:00
Karoy Lorentey
cd550160a1 [test] Cleanup 2023-01-03 16:08:14 -08:00
Karoy Lorentey
8cd86a2dac Merge pull request #62799 from lorentey/reenable-string-test
[test] Fix and reenable a Substring.removeSubrange test
2023-01-03 13:48:47 -08:00
Ben Rimmington
236829265d [SE-0368] StaticBigInt: Fix test failures (#62746)
<rdar://103369837>
2023-01-03 21:21:21 +00:00
Karoy Lorentey
051f9ede46 [test] String.UTF16View: Add some basic collection tests
Evidently we did not have any tests that exercised
`distance(from:to:)` and `index(_:offsetBy:)`. :-O
2023-01-01 20:58:24 -08:00
Karoy Lorentey
9dd7475d88 [test] Fix and reenable a Substring.removeSubrange test 2022-12-31 17:58:26 -08:00
Karoy Lorentey
f8b997b068 [test] Add tests for string index rounding 2022-12-31 17:42:35 -08:00
Karoy Lorentey
55583ac13c [stdlib] Add new SPI for grapheme breaking (outside String)
`Unicode._CharacterRecognizer` is a newly exported opaque type that
exposes the stdlib’s extended grapheme cluster breaking facility,
independent of `String`.

This essentially makes the underlying simple state machine public,
without exposing any of the (unstable) Unicode details.

The ability to perform grapheme breaking over, say, the scalars stored
in multiple `String` values can be extremely useful while building
custom text processing algorithms and data structures.

Ideally this would eventually become API, but before proposing this
to Swift Evolution, I’d like to prove the shape of the type in actual
use (and we’ll also need to find better names for its operations).
2022-12-30 16:32:01 -08:00
Karoy Lorentey
4d9edad297 [test] Improve grapheme breaking tests
Instead of just checking the number of breaks in each test case,
expose and check the actual positions of those breaks, too.
2022-12-29 17:56:45 -08:00
Alexis Laferrière
cb435c2104 [Test] Disable stdlib/StaticBigInt on macOS 2022-12-15 13:38:05 -08:00
Alexis Laferrière
bba52dd26c [Test] Disable StaticBigInt test on watchOS 2022-12-14 16:05:27 -08:00
Mishal Shah
45d6cb04ac Disable NSSlowTaggedLocalizedString.swift
This test started failing in Xcode 14.1 with macOS 12.6
2022-12-14 10:02:14 -08:00
Ben Rimmington
0b29450a3d [SE-0368] StaticBigInt (#40722) 2022-12-06 21:59:42 +00:00
Jonathan Grynspan
e057172b6f Make _swift_willThrow atomic (#62349)
* Make _swift_willThrow atomic
2022-12-03 10:41:56 -05:00