Update tests for 6.1 Unicode 16 stdlib

This commit is contained in:
Alejandro Alonso
2025-01-15 14:09:57 -08:00
parent d3146e37b3
commit 708d72d2c3
10 changed files with 1586 additions and 335 deletions

View File

@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -15,7 +15,7 @@
// RUN: %target-build-swift -I %S/Inputs/NSSlowString/ %t/NSSlowString.o %s -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %target-run %t/a.out %S/Inputs/NormalizationTest.txt %S/Inputs/NormalizationTest15.txt
// RUN: %target-run %t/a.out %S/Inputs/NormalizationTest.txt %S/Inputs/NormalizationTest16.txt
// REQUIRES: executable_test
// REQUIRES: objc_interop
// REQUIRES: optimized_stdlib
@@ -94,13 +94,13 @@ tests.test("StringNormalization/ConvertNFK*ToNFKC")
}
//==------------------------------------------------------------------------==//
// Newer stdlib with native normalization and supporting Unicode 15
// Newer stdlib with native normalization and supporting Unicode 16
//==------------------------------------------------------------------------==//
if #available(SwiftStdlib 5.9, *) {
tests.test("StringNormalization15/ConvertToNFC")
if #available(SwiftStdlib 6.1, *) {
tests.test("StringNormalization16/ConvertToNFC")
.code {
for test in normalizationTests14 {
for test in normalizationTestsNew {
expectEqualIterators(
label: "NFC",
expected: test.NFC,
@@ -114,9 +114,9 @@ if #available(SwiftStdlib 5.9, *) {
}
}
tests.test("StringNormalization15/ConvertNFK*ToNFKC")
tests.test("StringNormalization16/ConvertNFK*ToNFKC")
.code {
for test in normalizationTests14 {
for test in normalizationTestsNew {
expectEqualIterators(
label: "NFKC",
expected: test.NFKC,