[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:
Ben Langmuir
2024-08-14 09:33:19 -07:00
parent 915b5312ba
commit 85d9acf138
2 changed files with 0 additions and 7 deletions

View File

@@ -80,8 +80,6 @@ StringForPrintObjectTests.test("NSStringUTF8") {
if #available(SwiftStdlib 6.1, *) {
expectEqual("🏂☃❅❆❄︎⛄️❄️\n", printed)
} else {
expectEqual("\"🏂☃❅❆❄︎⛄️❄️\"\n", printed)
}
expectEqual(printed, debug)

View File

@@ -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 {