"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "validation-test/stdlib/StringGraphemeBreaking.swift" between
swift-swift-5.8-RELEASE.tar.gz and swift-swift-5.8.1-RELEASE.tar.gz

About: Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns (developed by Apple).

StringGraphemeBreaking.swift  (swift-swift-5.8-RELEASE):StringGraphemeBreaking.swift  (swift-swift-5.8.1-RELEASE)
skipping to change at line 55 skipping to change at line 55
expectEqual( expectEqual(
string.forwardPieces, pieces, string.forwardPieces, pieces,
"string: \(String(reflecting: string)) (forward)", "string: \(String(reflecting: string)) (forward)",
file: file, line: line) file: file, line: line)
expectEqual( expectEqual(
string.backwardPieces, pieces, string.backwardPieces, pieces,
"string: \(String(reflecting: string)) (backward)", "string: \(String(reflecting: string)) (backward)",
file: file, line: line) file: file, line: line)
} }
if #available(SwiftStdlib 5.6, *) { if #available(SwiftStdlib 5.9, *) {
StringGraphemeBreaking.test("grapheme breaking") { StringGraphemeBreaking.test("grapheme breaking") {
for test in graphemeBreakTests { for test in graphemeBreakTests {
check(test.string, test.pieces) check(test.string, test.pieces)
} }
} }
} }
// The most simple subclass of NSString that CoreFoundation does not know // The most simple subclass of NSString that CoreFoundation does not know
// about. // about.
class NonContiguousNSString: NSString { class NonContiguousNSString: NSString {
skipping to change at line 105 skipping to change at line 105
} }
var _value: [UInt16] var _value: [UInt16]
} }
extension _StringGuts { extension _StringGuts {
@_silgen_name("$ss11_StringGutsV9isForeignSbvg") @_silgen_name("$ss11_StringGutsV9isForeignSbvg")
func _isForeign() -> Bool func _isForeign() -> Bool
} }
if #available(SwiftStdlib 5.6, *) { if #available(SwiftStdlib 5.9, *) {
StringGraphemeBreaking.test("grapheme breaking foreign") { StringGraphemeBreaking.test("grapheme breaking foreign") {
for test in graphemeBreakTests { for test in graphemeBreakTests {
let foreign = NonContiguousNSString(test.string.utf16) let foreign = NonContiguousNSString(test.string.utf16)
let string = foreign as String let string = foreign as String
expectTrue(string._guts._isForeign()) expectTrue(string._guts._isForeign())
check(string, test.pieces) check(string, test.pieces)
} }
} }
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)