[stdlib][test] Update string printing availability checks

The change in behaviour that these checks covered is not currently in 6.0,
only in main. Update the availability check to use stdlib 6.1.
This commit is contained in:
Ben Langmuir
2024-08-08 14:58:57 -07:00
parent 31a9cd9b4f
commit 56fa3e54c8
2 changed files with 9 additions and 2 deletions

View File

@@ -78,8 +78,10 @@ StringForPrintObjectTests.test("NSStringUTF8") {
expectEqual("🏂☃❅❆❄︎⛄️❄️", String(reflecting: nsUTF16))
expectEqual("\"🏂☃❅❆❄︎⛄️❄️\"", String(reflecting: newNSUTF16))
if #available(SwiftStdlib 6.0, *) {
if #available(SwiftStdlib 6.1, *) {
expectEqual("🏂☃❅❆❄︎⛄️❄️\n", printed)
} else {
expectEqual("\"🏂☃❅❆❄︎⛄️❄️\"\n", printed)
}
expectEqual(printed, debug)