mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[stdlib][test] Remove problematic else branches in availability checks
Testing the old behaviour can cause issues when the new availability gets properly defined. Just check the new behaviour, which is what we are doing in other stdlib tests.
This commit is contained in:
@@ -80,8 +80,6 @@ StringForPrintObjectTests.test("NSStringUTF8") {
|
||||
|
||||
if #available(SwiftStdlib 6.1, *) {
|
||||
expectEqual("🏂☃❅❆❄︎⛄️❄️\n", printed)
|
||||
} else {
|
||||
expectEqual("\"🏂☃❅❆❄︎⛄️❄️\"\n", printed)
|
||||
}
|
||||
|
||||
expectEqual(printed, debug)
|
||||
|
||||
@@ -106,11 +106,6 @@ if #available(SwiftStdlib 6.1, *) {
|
||||
let printed = _stringForPrintObject("hello\nworld")
|
||||
expectEqual(printed, "hello\nworld\n")
|
||||
}
|
||||
} else {
|
||||
StringForPrintObjectTests.test("String") {
|
||||
let printed = _stringForPrintObject("hello\nworld")
|
||||
expectEqual(printed, "\"hello\\nworld\"\n")
|
||||
}
|
||||
}
|
||||
|
||||
class RefCountedObj {
|
||||
|
||||
Reference in New Issue
Block a user