From 36634af4ada181cf1beaa66bf9822b939b904fb5 Mon Sep 17 00:00:00 2001 From: mesqueeb Date: Sun, 7 Jul 2024 15:01:34 +0900 Subject: [PATCH 1/2] test: use swift testing --- Tests/ComprehensiveTests.swift | 863 ++++++++++++++++----------------- Tests/ShortTests.swift | 202 ++++---- Tests/UtilTests.swift | 110 +++-- 3 files changed, 583 insertions(+), 592 deletions(-) diff --git a/Tests/ComprehensiveTests.swift b/Tests/ComprehensiveTests.swift index d6dbb3a..8c87caf 100644 --- a/Tests/ComprehensiveTests.swift +++ b/Tests/ComprehensiveTests.swift @@ -1,247 +1,244 @@ // swiftformat:disable all -import XCTest +import Testing @testable import CaseAnything -final class ComprehensiveTests: XCTestCase { -// a bunch of different combinations - -func testCamelCase() { - XCTAssertEqual(camelCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "ponytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(camelCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "ponytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(camelCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "ponytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(camelCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "ponytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(camelCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "ponytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(camelCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "ponytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(camelCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "ponytaVaporeonPoliwrathButterfreeA") -} -func testPascalCase() { - XCTAssertEqual(pascalCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "PonytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(pascalCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "PonytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(pascalCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "PonytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(pascalCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "PonytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(pascalCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "PonytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(pascalCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "PonytaVaporeonPoliwrathButterfreeA") - XCTAssertEqual(pascalCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "PonytaVaporeonPoliwrathButterfreeA") -} -func testKebabCase() { - XCTAssertEqual(kebabCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "ponyta-vaporeon-poliwrath-butterfree-a") - XCTAssertEqual(kebabCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "ponyta-vaporeon-poliwrath-butterfree-a") - XCTAssertEqual(kebabCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "ponyta-vaporeon-poliwrath-butterfree-a") - XCTAssertEqual(kebabCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "ponyta-vaporeon-poliwrath-butterfree-a") - XCTAssertEqual(kebabCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "ponyta-vaporeon-poliwrath-butterfree-a") - XCTAssertEqual(kebabCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "ponyta-vaporeon-poliwrath-butterfree-a") - XCTAssertEqual(kebabCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "ponyta-vaporeon-poliwrath-butterfree-a") -} -func testSnakeCase() { - XCTAssertEqual(snakeCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "ponyta_vaporeon_poliwrath_butterfree_a") - XCTAssertEqual(snakeCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "ponyta_vaporeon_poliwrath_butterfree_a") - XCTAssertEqual(snakeCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "ponyta_vaporeon_poliwrath_butterfree_a") - XCTAssertEqual(snakeCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "ponyta_vaporeon_poliwrath_butterfree_a") - XCTAssertEqual(snakeCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "ponyta_vaporeon_poliwrath_butterfree_a") - XCTAssertEqual(snakeCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "ponyta_vaporeon_poliwrath_butterfree_a") - XCTAssertEqual(snakeCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "ponyta_vaporeon_poliwrath_butterfree_a") -} -func testConstantCase() { - XCTAssertEqual(constantCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") - XCTAssertEqual(constantCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") - XCTAssertEqual(constantCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") - XCTAssertEqual(constantCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") - XCTAssertEqual(constantCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") - XCTAssertEqual(constantCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") - XCTAssertEqual(constantCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") -} -func testDotNotation() { - XCTAssertEqual(dotNotation("ponytaVaporeonPOLIWRATH_ButterfreeA"), "ponyta.Vaporeon.POLIWRATH.Butterfree.A") - XCTAssertEqual(dotNotation("PonytaVaporeonPOLIWRATH_ButterfreeA"), "Ponyta.Vaporeon.POLIWRATH.Butterfree.A") - XCTAssertEqual(dotNotation("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "ponyta.vaporeon.POLIWRATH.Butterfree.A") - XCTAssertEqual(dotNotation("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "Ponyta.vaporeon.POLIWRATH.Butterfree.A") - XCTAssertEqual(dotNotation("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "ponyta.vaporeon.POLIWRATH.Butterfree.A") - XCTAssertEqual(dotNotation("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "ponyta.Vaporeon.POLIWRATH.Butterfree.A") - XCTAssertEqual(dotNotation("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "ponyta.Vaporeon.POLIWRATH.Butterfree.A") -} -func testAdaCase() { - XCTAssertEqual(adaCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "Ponyta_Vaporeon_Poliwrath_Butterfree_A") - XCTAssertEqual(adaCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "Ponyta_Vaporeon_Poliwrath_Butterfree_A") - XCTAssertEqual(adaCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "Ponyta_Vaporeon_Poliwrath_Butterfree_A") - XCTAssertEqual(adaCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "Ponyta_Vaporeon_Poliwrath_Butterfree_A") - XCTAssertEqual(adaCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "Ponyta_Vaporeon_Poliwrath_Butterfree_A") - XCTAssertEqual(adaCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "Ponyta_Vaporeon_Poliwrath_Butterfree_A") - XCTAssertEqual(adaCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "Ponyta_Vaporeon_Poliwrath_Butterfree_A") -} -func testCobolCase() { - XCTAssertEqual(cobolCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") - XCTAssertEqual(cobolCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") - XCTAssertEqual(cobolCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") - XCTAssertEqual(cobolCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") - XCTAssertEqual(cobolCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") - XCTAssertEqual(cobolCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") - XCTAssertEqual(cobolCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") -} -func testTrainCase() { - XCTAssertEqual(trainCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "Ponyta-Vaporeon-Poliwrath-Butterfree-A") - XCTAssertEqual(trainCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "Ponyta-Vaporeon-Poliwrath-Butterfree-A") - XCTAssertEqual(trainCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "Ponyta-Vaporeon-Poliwrath-Butterfree-A") - XCTAssertEqual(trainCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "Ponyta-Vaporeon-Poliwrath-Butterfree-A") - XCTAssertEqual(trainCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "Ponyta-Vaporeon-Poliwrath-Butterfree-A") - XCTAssertEqual(trainCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "Ponyta-Vaporeon-Poliwrath-Butterfree-A") - XCTAssertEqual(trainCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "Ponyta-Vaporeon-Poliwrath-Butterfree-A") -} -func testLowerCase() { - XCTAssertEqual(lowerCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "ponyta vaporeon poliwrath_butterfree a") - XCTAssertEqual(lowerCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "ponyta vaporeon poliwrath_butterfree a") - XCTAssertEqual(lowerCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "ponyta-vaporeon-poliwrath-butterfree a") - XCTAssertEqual(lowerCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "ponyta~vaporeon~poliwrath/butterfree a") - XCTAssertEqual(lowerCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "ponyta_vaporeon_poliwrath_butterfree a") - XCTAssertEqual(lowerCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "ponyta_vaporeon_poliwrath_butterfree a") - XCTAssertEqual(lowerCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "ponyta.vaporeon.poliwrath.butterfree a") -} -func testUpperCase() { - XCTAssertEqual(upperCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "PONYTA VAPOREON POLIWRATH_BUTTERFREE A") - XCTAssertEqual(upperCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "PONYTA VAPOREON POLIWRATH_BUTTERFREE A") - XCTAssertEqual(upperCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE A") - XCTAssertEqual(upperCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "PONYTA~VAPOREON~POLIWRATH/BUTTERFREE A") - XCTAssertEqual(upperCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE A") - XCTAssertEqual(upperCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE A") - XCTAssertEqual(upperCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "PONYTA.VAPOREON.POLIWRATH.BUTTERFREE A") -} -func testCapitalCase() { - XCTAssertEqual(capitalCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "Ponyta Vaporeon Poliwrath_Butterfree A") - XCTAssertEqual(capitalCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "Ponyta Vaporeon Poliwrath_Butterfree A") - XCTAssertEqual(capitalCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "Ponyta-Vaporeon-Poliwrath-Butterfree A") - XCTAssertEqual(capitalCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "Ponyta~Vaporeon~Poliwrath/Butterfree A") - XCTAssertEqual(capitalCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "Ponyta_Vaporeon_Poliwrath_Butterfree A") - XCTAssertEqual(capitalCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "Ponyta_Vaporeon_Poliwrath_Butterfree A") - XCTAssertEqual(capitalCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "Ponyta.Vaporeon.Poliwrath.Butterfree A") -} -func testSpaceCase() { - XCTAssertEqual(spaceCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "ponyta Vaporeon POLIWRATH_Butterfree A") - XCTAssertEqual(spaceCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "Ponyta Vaporeon POLIWRATH_Butterfree A") - XCTAssertEqual(spaceCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "ponyta-vaporeon-POLIWRATH-Butterfree A") - XCTAssertEqual(spaceCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "Ponyta~vaporeon~POLIWRATH/Butterfree A") - XCTAssertEqual(spaceCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "ponyta_vaporeon_POLIWRATH_Butterfree A") - XCTAssertEqual(spaceCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "ponyta_Vaporeon_POLIWRATH_Butterfree A") - XCTAssertEqual(spaceCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "ponyta.Vaporeon.POLIWRATH.Butterfree A") +@Test func camelCase() async throws { + #expect(camelCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "ponytaVaporeonPoliwrathButterfreeA") + #expect(camelCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "ponytaVaporeonPoliwrathButterfreeA") + #expect(camelCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "ponytaVaporeonPoliwrathButterfreeA") + #expect(camelCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "ponytaVaporeonPoliwrathButterfreeA") + #expect(camelCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "ponytaVaporeonPoliwrathButterfreeA") + #expect(camelCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "ponytaVaporeonPoliwrathButterfreeA") + #expect(camelCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "ponytaVaporeonPoliwrathButterfreeA") +} +@Test func pascalCase() async throws { + #expect(pascalCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "PonytaVaporeonPoliwrathButterfreeA") + #expect(pascalCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "PonytaVaporeonPoliwrathButterfreeA") + #expect(pascalCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "PonytaVaporeonPoliwrathButterfreeA") + #expect(pascalCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "PonytaVaporeonPoliwrathButterfreeA") + #expect(pascalCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "PonytaVaporeonPoliwrathButterfreeA") + #expect(pascalCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "PonytaVaporeonPoliwrathButterfreeA") + #expect(pascalCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "PonytaVaporeonPoliwrathButterfreeA") +} +@Test func kebabCase() async throws { + #expect(kebabCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "ponyta-vaporeon-poliwrath-butterfree-a") + #expect(kebabCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "ponyta-vaporeon-poliwrath-butterfree-a") + #expect(kebabCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "ponyta-vaporeon-poliwrath-butterfree-a") + #expect(kebabCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "ponyta-vaporeon-poliwrath-butterfree-a") + #expect(kebabCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "ponyta-vaporeon-poliwrath-butterfree-a") + #expect(kebabCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "ponyta-vaporeon-poliwrath-butterfree-a") + #expect(kebabCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "ponyta-vaporeon-poliwrath-butterfree-a") +} +@Test func snakeCase() async throws { + #expect(snakeCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "ponyta_vaporeon_poliwrath_butterfree_a") + #expect(snakeCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "ponyta_vaporeon_poliwrath_butterfree_a") + #expect(snakeCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "ponyta_vaporeon_poliwrath_butterfree_a") + #expect(snakeCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "ponyta_vaporeon_poliwrath_butterfree_a") + #expect(snakeCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "ponyta_vaporeon_poliwrath_butterfree_a") + #expect(snakeCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "ponyta_vaporeon_poliwrath_butterfree_a") + #expect(snakeCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "ponyta_vaporeon_poliwrath_butterfree_a") +} +@Test func constantCase() async throws { + #expect(constantCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") + #expect(constantCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") + #expect(constantCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") + #expect(constantCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") + #expect(constantCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") + #expect(constantCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") + #expect(constantCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE_A") +} +@Test func dotNotation() async throws { + #expect(dotNotation("ponytaVaporeonPOLIWRATH_ButterfreeA") == "ponyta.Vaporeon.POLIWRATH.Butterfree.A") + #expect(dotNotation("PonytaVaporeonPOLIWRATH_ButterfreeA") == "Ponyta.Vaporeon.POLIWRATH.Butterfree.A") + #expect(dotNotation("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "ponyta.vaporeon.POLIWRATH.Butterfree.A") + #expect(dotNotation("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "Ponyta.vaporeon.POLIWRATH.Butterfree.A") + #expect(dotNotation("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "ponyta.vaporeon.POLIWRATH.Butterfree.A") + #expect(dotNotation("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "ponyta.Vaporeon.POLIWRATH.Butterfree.A") + #expect(dotNotation("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "ponyta.Vaporeon.POLIWRATH.Butterfree.A") +} +@Test func adaCase() async throws { + #expect(adaCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "Ponyta_Vaporeon_Poliwrath_Butterfree_A") + #expect(adaCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "Ponyta_Vaporeon_Poliwrath_Butterfree_A") + #expect(adaCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "Ponyta_Vaporeon_Poliwrath_Butterfree_A") + #expect(adaCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "Ponyta_Vaporeon_Poliwrath_Butterfree_A") + #expect(adaCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "Ponyta_Vaporeon_Poliwrath_Butterfree_A") + #expect(adaCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "Ponyta_Vaporeon_Poliwrath_Butterfree_A") + #expect(adaCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "Ponyta_Vaporeon_Poliwrath_Butterfree_A") +} +@Test func cobolCase() async throws { + #expect(cobolCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") + #expect(cobolCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") + #expect(cobolCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") + #expect(cobolCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") + #expect(cobolCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") + #expect(cobolCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") + #expect(cobolCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE-A") +} +@Test func trainCase() async throws { + #expect(trainCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "Ponyta-Vaporeon-Poliwrath-Butterfree-A") + #expect(trainCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "Ponyta-Vaporeon-Poliwrath-Butterfree-A") + #expect(trainCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "Ponyta-Vaporeon-Poliwrath-Butterfree-A") + #expect(trainCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "Ponyta-Vaporeon-Poliwrath-Butterfree-A") + #expect(trainCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "Ponyta-Vaporeon-Poliwrath-Butterfree-A") + #expect(trainCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "Ponyta-Vaporeon-Poliwrath-Butterfree-A") + #expect(trainCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "Ponyta-Vaporeon-Poliwrath-Butterfree-A") +} +@Test func lowerCase() async throws { + #expect(lowerCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "ponyta vaporeon poliwrath_butterfree a") + #expect(lowerCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "ponyta vaporeon poliwrath_butterfree a") + #expect(lowerCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "ponyta-vaporeon-poliwrath-butterfree a") + #expect(lowerCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "ponyta~vaporeon~poliwrath/butterfree a") + #expect(lowerCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "ponyta_vaporeon_poliwrath_butterfree a") + #expect(lowerCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "ponyta_vaporeon_poliwrath_butterfree a") + #expect(lowerCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "ponyta.vaporeon.poliwrath.butterfree a") +} +@Test func upperCase() async throws { + #expect(upperCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "PONYTA VAPOREON POLIWRATH_BUTTERFREE A") + #expect(upperCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "PONYTA VAPOREON POLIWRATH_BUTTERFREE A") + #expect(upperCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "PONYTA-VAPOREON-POLIWRATH-BUTTERFREE A") + #expect(upperCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "PONYTA~VAPOREON~POLIWRATH/BUTTERFREE A") + #expect(upperCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE A") + #expect(upperCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "PONYTA_VAPOREON_POLIWRATH_BUTTERFREE A") + #expect(upperCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "PONYTA.VAPOREON.POLIWRATH.BUTTERFREE A") +} +@Test func capitalCase() async throws { + #expect(capitalCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "Ponyta Vaporeon Poliwrath_Butterfree A") + #expect(capitalCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "Ponyta Vaporeon Poliwrath_Butterfree A") + #expect(capitalCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "Ponyta-Vaporeon-Poliwrath-Butterfree A") + #expect(capitalCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "Ponyta~Vaporeon~Poliwrath/Butterfree A") + #expect(capitalCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "Ponyta_Vaporeon_Poliwrath_Butterfree A") + #expect(capitalCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "Ponyta_Vaporeon_Poliwrath_Butterfree A") + #expect(capitalCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "Ponyta.Vaporeon.Poliwrath.Butterfree A") +} +@Test func spaceCase() async throws { + #expect(spaceCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "ponyta Vaporeon POLIWRATH_Butterfree A") + #expect(spaceCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "Ponyta Vaporeon POLIWRATH_Butterfree A") + #expect(spaceCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "ponyta-vaporeon-POLIWRATH-Butterfree A") + #expect(spaceCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "Ponyta~vaporeon~POLIWRATH/Butterfree A") + #expect(spaceCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "ponyta_vaporeon_POLIWRATH_Butterfree A") + #expect(spaceCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "ponyta_Vaporeon_POLIWRATH_Butterfree A") + #expect(spaceCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "ponyta.Vaporeon.POLIWRATH.Butterfree A") } -func testPathCase() { - XCTAssertEqual(pathCase("ponytaVaporeonPOLIWRATH_ButterfreeA"), "ponyta/Vaporeon/POLIWRATH/_Butterfree/A") - XCTAssertEqual(pathCase("PonytaVaporeonPOLIWRATH_ButterfreeA"), "Ponyta/Vaporeon/POLIWRATH/_Butterfree/A") - XCTAssertEqual(pathCase("ponyta-vaporeon-POLIWRATH-ButterfreeA"), "ponyta/-vaporeon/-POLIWRATH/-Butterfree/A") - XCTAssertEqual(pathCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA"), "Ponyta/~vaporeon/~POLIWRATH/Butterfree/A") - XCTAssertEqual(pathCase("ponyta_vaporeon_POLIWRATH_ButterfreeA"), "ponyta/_vaporeon/_POLIWRATH/_Butterfree/A") - XCTAssertEqual(pathCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA"), "ponyta/_Vaporeon/_POLIWRATH/_Butterfree/A") - XCTAssertEqual(pathCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA"), "ponyta/.Vaporeon/.POLIWRATH/.Butterfree/A") -} -func testLowerCase_stripSpecialCharacters() { - XCTAssertEqual(lowerCase("ponytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false), "ponyta vaporeon poliwrath butterfree a") // prettier-ignore - XCTAssertEqual(lowerCase("PonytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false), "ponyta vaporeon poliwrath butterfree a") // prettier-ignore - XCTAssertEqual(lowerCase("ponyta-vaporeon-POLIWRATH-ButterfreeA", keepSpecialCharacters: false), "ponyta vaporeon poliwrath butterfree a") // prettier-ignore - XCTAssertEqual(lowerCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA", keepSpecialCharacters: false), "ponyta vaporeon poliwrath butterfree a") // prettier-ignore - XCTAssertEqual(lowerCase("ponyta_vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false), "ponyta vaporeon poliwrath butterfree a") // prettier-ignore - XCTAssertEqual(lowerCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false), "ponyta vaporeon poliwrath butterfree a") // prettier-ignore - XCTAssertEqual(lowerCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA", keepSpecialCharacters: false), "ponyta vaporeon poliwrath butterfree a") // prettier-ignore -} -func testUpperCase_stripSpecialCharacters() { - XCTAssertEqual(upperCase("ponytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false), "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore - XCTAssertEqual(upperCase("PonytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false), "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore - XCTAssertEqual(upperCase("ponyta-vaporeon-POLIWRATH-ButterfreeA", keepSpecialCharacters: false), "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore - XCTAssertEqual(upperCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA", keepSpecialCharacters: false), "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore - XCTAssertEqual(upperCase("ponyta_vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false), "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore - XCTAssertEqual(upperCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false), "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore - XCTAssertEqual(upperCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA", keepSpecialCharacters: false), "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore -} -func testCapitalCase_stripSpecialCharacters() { - XCTAssertEqual(capitalCase("ponytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false), "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore - XCTAssertEqual(capitalCase("PonytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false), "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore - XCTAssertEqual(capitalCase("ponyta-vaporeon-POLIWRATH-ButterfreeA", keepSpecialCharacters: false), "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore - XCTAssertEqual(capitalCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA", keepSpecialCharacters: false), "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore - XCTAssertEqual(capitalCase("ponyta_vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false), "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore - XCTAssertEqual(capitalCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false), "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore - XCTAssertEqual(capitalCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA", keepSpecialCharacters: false), "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore -} -func testSpaceCase_stripSpecialCharacters() { - XCTAssertEqual(spaceCase("ponytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false), "ponyta Vaporeon POLIWRATH Butterfree A") // prettier-ignore - XCTAssertEqual(spaceCase("PonytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false), "Ponyta Vaporeon POLIWRATH Butterfree A") // prettier-ignore - XCTAssertEqual(spaceCase("ponyta-vaporeon-POLIWRATH-ButterfreeA", keepSpecialCharacters: false), "ponyta vaporeon POLIWRATH Butterfree A") // prettier-ignore - XCTAssertEqual(spaceCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA", keepSpecialCharacters: false), "Ponyta vaporeon POLIWRATH Butterfree A") // prettier-ignore - XCTAssertEqual(spaceCase("ponyta_vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false), "ponyta vaporeon POLIWRATH Butterfree A") // prettier-ignore - XCTAssertEqual(spaceCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false), "ponyta Vaporeon POLIWRATH Butterfree A") // prettier-ignore - XCTAssertEqual(spaceCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA", keepSpecialCharacters: false), "ponyta Vaporeon POLIWRATH Butterfree A") // prettier-ignore +@Test func pathCase() async throws { + #expect(pathCase("ponytaVaporeonPOLIWRATH_ButterfreeA") == "ponyta/Vaporeon/POLIWRATH/_Butterfree/A") + #expect(pathCase("PonytaVaporeonPOLIWRATH_ButterfreeA") == "Ponyta/Vaporeon/POLIWRATH/_Butterfree/A") + #expect(pathCase("ponyta-vaporeon-POLIWRATH-ButterfreeA") == "ponyta/-vaporeon/-POLIWRATH/-Butterfree/A") + #expect(pathCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA") == "Ponyta/~vaporeon/~POLIWRATH/Butterfree/A") + #expect(pathCase("ponyta_vaporeon_POLIWRATH_ButterfreeA") == "ponyta/_vaporeon/_POLIWRATH/_Butterfree/A") + #expect(pathCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA") == "ponyta/_Vaporeon/_POLIWRATH/_Butterfree/A") + #expect(pathCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA") == "ponyta/.Vaporeon/.POLIWRATH/.Butterfree/A") +} +@Test func lowerCase_stripSpecialCharacters() async throws { + #expect(lowerCase("ponytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "ponyta vaporeon poliwrath butterfree a") // prettier-ignore + #expect(lowerCase("PonytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "ponyta vaporeon poliwrath butterfree a") // prettier-ignore + #expect(lowerCase("ponyta-vaporeon-POLIWRATH-ButterfreeA", keepSpecialCharacters: false) == "ponyta vaporeon poliwrath butterfree a") // prettier-ignore + #expect(lowerCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA", keepSpecialCharacters: false) == "ponyta vaporeon poliwrath butterfree a") // prettier-ignore + #expect(lowerCase("ponyta_vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "ponyta vaporeon poliwrath butterfree a") // prettier-ignore + #expect(lowerCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "ponyta vaporeon poliwrath butterfree a") // prettier-ignore + #expect(lowerCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA", keepSpecialCharacters: false) == "ponyta vaporeon poliwrath butterfree a") // prettier-ignore +} +@Test func upperCase_stripSpecialCharacters() async throws { + #expect(upperCase("ponytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore + #expect(upperCase("PonytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore + #expect(upperCase("ponyta-vaporeon-POLIWRATH-ButterfreeA", keepSpecialCharacters: false) == "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore + #expect(upperCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA", keepSpecialCharacters: false) == "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore + #expect(upperCase("ponyta_vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore + #expect(upperCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore + #expect(upperCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA", keepSpecialCharacters: false) == "PONYTA VAPOREON POLIWRATH BUTTERFREE A") // prettier-ignore +} +@Test func capitalCase_stripSpecialCharacters() async throws { + #expect(capitalCase("ponytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore + #expect(capitalCase("PonytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore + #expect(capitalCase("ponyta-vaporeon-POLIWRATH-ButterfreeA", keepSpecialCharacters: false) == "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore + #expect(capitalCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA", keepSpecialCharacters: false) == "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore + #expect(capitalCase("ponyta_vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore + #expect(capitalCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore + #expect(capitalCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA", keepSpecialCharacters: false) == "Ponyta Vaporeon Poliwrath Butterfree A") // prettier-ignore +} +@Test func spaceCase_stripSpecialCharacters() async throws { + #expect(spaceCase("ponytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "ponyta Vaporeon POLIWRATH Butterfree A") // prettier-ignore + #expect(spaceCase("PonytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "Ponyta Vaporeon POLIWRATH Butterfree A") // prettier-ignore + #expect(spaceCase("ponyta-vaporeon-POLIWRATH-ButterfreeA", keepSpecialCharacters: false) == "ponyta vaporeon POLIWRATH Butterfree A") // prettier-ignore + #expect(spaceCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA", keepSpecialCharacters: false) == "Ponyta vaporeon POLIWRATH Butterfree A") // prettier-ignore + #expect(spaceCase("ponyta_vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "ponyta vaporeon POLIWRATH Butterfree A") // prettier-ignore + #expect(spaceCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "ponyta Vaporeon POLIWRATH Butterfree A") // prettier-ignore + #expect(spaceCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA", keepSpecialCharacters: false) == "ponyta Vaporeon POLIWRATH Butterfree A") // prettier-ignore } -func testPathCase_stripSpecialCharacters() { - XCTAssertEqual(pathCase("ponytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false), "ponyta/Vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore - XCTAssertEqual(pathCase("PonytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false), "Ponyta/Vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore - XCTAssertEqual(pathCase("ponyta-vaporeon-POLIWRATH-ButterfreeA", keepSpecialCharacters: false), "ponyta/vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore - XCTAssertEqual(pathCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA", keepSpecialCharacters: false), "Ponyta/vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore - XCTAssertEqual(pathCase("ponyta_vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false), "ponyta/vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore - XCTAssertEqual(pathCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false), "ponyta/Vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore - XCTAssertEqual(pathCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA", keepSpecialCharacters: false), "ponyta/Vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore +@Test func pathCase_stripSpecialCharacters() async throws { + #expect(pathCase("ponytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "ponyta/Vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore + #expect(pathCase("PonytaVaporeonPOLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "Ponyta/Vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore + #expect(pathCase("ponyta-vaporeon-POLIWRATH-ButterfreeA", keepSpecialCharacters: false) == "ponyta/vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore + #expect(pathCase("Ponyta~vaporeon~POLIWRATH/ButterfreeA", keepSpecialCharacters: false) == "Ponyta/vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore + #expect(pathCase("ponyta_vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "ponyta/vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore + #expect(pathCase("ponyta_Vaporeon_POLIWRATH_ButterfreeA", keepSpecialCharacters: false) == "ponyta/Vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore + #expect(pathCase("ponyta.Vaporeon.POLIWRATH.ButterfreeA", keepSpecialCharacters: false) == "ponyta/Vaporeon/POLIWRATH/Butterfree/A") // prettier-ignore } // single capital -func testCamelCase____QTableA() { XCTAssertEqual( camelCase("QTableA"), "qTableA") } -func testPascalCase___QTableA() { XCTAssertEqual( pascalCase("QTableA"), "QTableA") } -func testKebabCase____QTableA() { XCTAssertEqual( kebabCase("QTableA"), "q-table-a") } -func testSnakeCase____QTableA() { XCTAssertEqual( snakeCase("QTableA"), "q_table_a") } -func testConstantCase_QTableA() { XCTAssertEqual( constantCase("QTableA"), "Q_TABLE_A") } -func testDotNotation__QTableA() { XCTAssertEqual( dotNotation("QTableA"), "Q.Table.A") } -func testAdaCase______QTableA() { XCTAssertEqual( adaCase("QTableA"), "Q_Table_A") } -func testCobolCase____QTableA() { XCTAssertEqual( cobolCase("QTableA"), "Q-TABLE-A") } -func testTrainCase____QTableA() { XCTAssertEqual( trainCase("QTableA"), "Q-Table-A") } -func testSpaceCase____QTableA() { XCTAssertEqual( spaceCase("QTableA"), "Q Table A") } -func testPathCase_____QTableA() { XCTAssertEqual( pathCase("QTableA"), "Q/Table/A") } -func testLowerCase____QTableA() { XCTAssertEqual( lowerCase("QTableA"), "q table a") } -func testUpperCase____QTableA() { XCTAssertEqual( upperCase("QTableA"), "Q TABLE A") } -func testCapitalCase__QTableA() { XCTAssertEqual( capitalCase("QTableA"), "Q Table A") } +@Test func camelCase____QTableA() async throws { #expect( camelCase("QTableA") == "qTableA") } +@Test func pascalCase___QTableA() async throws { #expect( pascalCase("QTableA") == "QTableA") } +@Test func kebabCase____QTableA() async throws { #expect( kebabCase("QTableA") == "q-table-a") } +@Test func snakeCase____QTableA() async throws { #expect( snakeCase("QTableA") == "q_table_a") } +@Test func constantCase_QTableA() async throws { #expect( constantCase("QTableA") == "Q_TABLE_A") } +@Test func dotNotation__QTableA() async throws { #expect( dotNotation("QTableA") == "Q.Table.A") } +@Test func adaCase______QTableA() async throws { #expect( adaCase("QTableA") == "Q_Table_A") } +@Test func cobolCase____QTableA() async throws { #expect( cobolCase("QTableA") == "Q-TABLE-A") } +@Test func trainCase____QTableA() async throws { #expect( trainCase("QTableA") == "Q-Table-A") } +@Test func spaceCase____QTableA() async throws { #expect( spaceCase("QTableA") == "Q Table A") } +@Test func pathCase_____QTableA() async throws { #expect( pathCase("QTableA") == "Q/Table/A") } +@Test func lowerCase____QTableA() async throws { #expect( lowerCase("QTableA") == "q table a") } +@Test func upperCase____QTableA() async throws { #expect( upperCase("QTableA") == "Q TABLE A") } +@Test func capitalCase__QTableA() async throws { #expect( capitalCase("QTableA") == "Q Table A") } // spaces & special characters -func testCamelCase____ImAMIB101Ok() { XCTAssertEqual( camelCase("I'm a M.I.B. 101 OK?"), "imAMib101Ok") } -func testPascalCase___ImAMIB101Ok() { XCTAssertEqual( pascalCase("I'm a M.I.B. 101 OK?"), "ImAMib101Ok") } -func testKebabCase____ImAMIB101Ok() { XCTAssertEqual( kebabCase("I'm a M.I.B. 101 OK?"), "im-a-mib-101-ok") } -func testSnakeCase____ImAMIB101Ok() { XCTAssertEqual( snakeCase("I'm a M.I.B. 101 OK?"), "im_a_mib_101_ok") } -func testConstantCase_ImAMIB101Ok() { XCTAssertEqual( constantCase("I'm a M.I.B. 101 OK?"), "IM_A_MIB_101_OK") } -func testDotNotation__ImAMIB101Ok() { XCTAssertEqual( dotNotation("I'm a M.I.B. 101 OK?"), "Im.a.MIB.101.OK") } -func testAdaCase______ImAMIB101Ok() { XCTAssertEqual( adaCase("I'm a M.I.B. 101 OK?"), "Im_A_Mib_101_Ok") } -func testCobolCase____ImAMIB101Ok() { XCTAssertEqual( cobolCase("I'm a M.I.B. 101 OK?"), "IM-A-MIB-101-OK") } -func testTrainCase____ImAMIB101Ok() { XCTAssertEqual( trainCase("I'm a M.I.B. 101 OK?"), "Im-A-Mib-101-Ok") } -func testSpaceCase____ImAMIB101Ok() { XCTAssertEqual( spaceCase("I'm a M.I.B. 101 OK?"), "I'm a M.I.B. 101 OK?") } -func testPathCase_____ImAMIB101Ok() { XCTAssertEqual( pathCase("I'm a M.I.B. 101 OK?"), "I'm/a/M.I.B./101/OK?") } -func testLowerCase____ImAMIB101Ok() { XCTAssertEqual( lowerCase("I'm a M.I.B. 101 OK?"), "i'm a m.i.b. 101 ok?") } -func testUpperCase____ImAMIB101Ok() { XCTAssertEqual( upperCase("I'm a M.I.B. 101 OK?"), "I'M A M.I.B. 101 OK?") } -func testCapitalCase__ImAMIB101Ok() { XCTAssertEqual( capitalCase("I'm a M.I.B. 101 OK?"), "I'm A M.i.b. 101 Ok?") } +@Test func camelCase____ImAMIB101Ok() async throws { #expect( camelCase("I'm a M.I.B. 101 OK?") == "imAMib101Ok") } +@Test func pascalCase___ImAMIB101Ok() async throws { #expect( pascalCase("I'm a M.I.B. 101 OK?") == "ImAMib101Ok") } +@Test func kebabCase____ImAMIB101Ok() async throws { #expect( kebabCase("I'm a M.I.B. 101 OK?") == "im-a-mib-101-ok") } +@Test func snakeCase____ImAMIB101Ok() async throws { #expect( snakeCase("I'm a M.I.B. 101 OK?") == "im_a_mib_101_ok") } +@Test func constantCase_ImAMIB101Ok() async throws { #expect( constantCase("I'm a M.I.B. 101 OK?") == "IM_A_MIB_101_OK") } +@Test func dotNotation__ImAMIB101Ok() async throws { #expect( dotNotation("I'm a M.I.B. 101 OK?") == "Im.a.MIB.101.OK") } +@Test func adaCase______ImAMIB101Ok() async throws { #expect( adaCase("I'm a M.I.B. 101 OK?") == "Im_A_Mib_101_Ok") } +@Test func cobolCase____ImAMIB101Ok() async throws { #expect( cobolCase("I'm a M.I.B. 101 OK?") == "IM-A-MIB-101-OK") } +@Test func trainCase____ImAMIB101Ok() async throws { #expect( trainCase("I'm a M.I.B. 101 OK?") == "Im-A-Mib-101-Ok") } +@Test func spaceCase____ImAMIB101Ok() async throws { #expect( spaceCase("I'm a M.I.B. 101 OK?") == "I'm a M.I.B. 101 OK?") } +@Test func pathCase_____ImAMIB101Ok() async throws { #expect( pathCase("I'm a M.I.B. 101 OK?") == "I'm/a/M.I.B./101/OK?") } +@Test func lowerCase____ImAMIB101Ok() async throws { #expect( lowerCase("I'm a M.I.B. 101 OK?") == "i'm a m.i.b. 101 ok?") } +@Test func upperCase____ImAMIB101Ok() async throws { #expect( upperCase("I'm a M.I.B. 101 OK?") == "I'M A M.I.B. 101 OK?") } +@Test func capitalCase__ImAMIB101Ok() async throws { #expect( capitalCase("I'm a M.I.B. 101 OK?") == "I'm A M.i.b. 101 Ok?") } // spaces & special characters -func testCamelCase____listenIMOK() { XCTAssertEqual( camelCase("listen I'm O.K.!"), "listenImOk") } -func testPascalCase___listenIMOK() { XCTAssertEqual( pascalCase("listen I'm O.K.!"), "ListenImOk") } -func testKebabCase____listenIMOK() { XCTAssertEqual( kebabCase("listen I'm O.K.!"), "listen-im-ok") } -func testSnakeCase____listenIMOK() { XCTAssertEqual( snakeCase("listen I'm O.K.!"), "listen_im_ok") } -func testConstantCase_listenIMOK() { XCTAssertEqual( constantCase("listen I'm O.K.!"), "LISTEN_IM_OK") } -func testDotNotation__listenIMOK() { XCTAssertEqual( dotNotation("listen I'm O.K.!"), "listen.Im.OK") } -func testAdaCase______listenIMOK() { XCTAssertEqual( adaCase("listen I'm O.K.!"), "Listen_Im_Ok") } -func testCobolCase____listenIMOK() { XCTAssertEqual( cobolCase("listen I'm O.K.!"), "LISTEN-IM-OK") } -func testTrainCase____listenIMOK() { XCTAssertEqual( trainCase("listen I'm O.K.!"), "Listen-Im-Ok") } -func testSpaceCase____listenIMOK() { XCTAssertEqual( spaceCase("listen I'm O.K.!"), "listen I'm O.K.!") } -func testPathCase_____listenIMOK() { XCTAssertEqual( pathCase("listen I'm O.K.!"), "listen/I'm/O.K.!") } -func testLowerCase____listenIMOK() { XCTAssertEqual( lowerCase("listen I'm O.K.!"), "listen i'm o.k.!") } -func testUpperCase____listenIMOK() { XCTAssertEqual( upperCase("listen I'm O.K.!"), "LISTEN I'M O.K.!") } -func testCapitalCase__listenIMOK() { XCTAssertEqual( capitalCase("listen I'm O.K.!"), "Listen I'm O.k.!") } +@Test func camelCase____listenIMOK() async throws { #expect( camelCase("listen I'm O.K.!") == "listenImOk") } +@Test func pascalCase___listenIMOK() async throws { #expect( pascalCase("listen I'm O.K.!") == "ListenImOk") } +@Test func kebabCase____listenIMOK() async throws { #expect( kebabCase("listen I'm O.K.!") == "listen-im-ok") } +@Test func snakeCase____listenIMOK() async throws { #expect( snakeCase("listen I'm O.K.!") == "listen_im_ok") } +@Test func constantCase_listenIMOK() async throws { #expect( constantCase("listen I'm O.K.!") == "LISTEN_IM_OK") } +@Test func dotNotation__listenIMOK() async throws { #expect( dotNotation("listen I'm O.K.!") == "listen.Im.OK") } +@Test func adaCase______listenIMOK() async throws { #expect( adaCase("listen I'm O.K.!") == "Listen_Im_Ok") } +@Test func cobolCase____listenIMOK() async throws { #expect( cobolCase("listen I'm O.K.!") == "LISTEN-IM-OK") } +@Test func trainCase____listenIMOK() async throws { #expect( trainCase("listen I'm O.K.!") == "Listen-Im-Ok") } +@Test func spaceCase____listenIMOK() async throws { #expect( spaceCase("listen I'm O.K.!") == "listen I'm O.K.!") } +@Test func pathCase_____listenIMOK() async throws { #expect( pathCase("listen I'm O.K.!") == "listen/I'm/O.K.!") } +@Test func lowerCase____listenIMOK() async throws { #expect( lowerCase("listen I'm O.K.!") == "listen i'm o.k.!") } +@Test func upperCase____listenIMOK() async throws { #expect( upperCase("listen I'm O.K.!") == "LISTEN I'M O.K.!") } +@Test func capitalCase__listenIMOK() async throws { #expect( capitalCase("listen I'm O.K.!") == "Listen I'm O.k.!") } // double spacing -func testCamelCase____doubleRainbow() { XCTAssertEqual( camelCase("Double Rainbow"), "doubleRainbow") } -func testPascalCase___doubleRainbow() { XCTAssertEqual( pascalCase("Double Rainbow"), "DoubleRainbow") } -func testKebabCase____doubleRainbow() { XCTAssertEqual( kebabCase("Double Rainbow"), "double-rainbow") } -func testSnakeCase____doubleRainbow() { XCTAssertEqual( snakeCase("Double Rainbow"), "double_rainbow") } -func testConstantCase_doubleRainbow() { XCTAssertEqual( constantCase("Double Rainbow"), "DOUBLE_RAINBOW") } -func testDotNotation__doubleRainbow() { XCTAssertEqual( dotNotation("Double Rainbow"), "Double.Rainbow") } -func testAdaCase______doubleRainbow() { XCTAssertEqual( adaCase("Double Rainbow"), "Double_Rainbow") } -func testCobolCase____doubleRainbow() { XCTAssertEqual( cobolCase("Double Rainbow"), "DOUBLE-RAINBOW") } -func testTrainCase____doubleRainbow() { XCTAssertEqual( trainCase("Double Rainbow"), "Double-Rainbow") } -func testSpaceCase____doubleRainbow() { XCTAssertEqual( spaceCase("Double Rainbow"), "Double Rainbow") } -func testPathCase_____doubleRainbow() { XCTAssertEqual( pathCase("Double Rainbow"), "Double/Rainbow") } -func testLowerCase____doubleRainbow() { XCTAssertEqual( lowerCase("Double Rainbow"), "double rainbow") } -func testUpperCase____doubleRainbow() { XCTAssertEqual( upperCase("Double Rainbow"), "DOUBLE RAINBOW") } -func testCapitalCase__doubleRainbow() { XCTAssertEqual( capitalCase("Double Rainbow"), "Double Rainbow") } +@Test func camelCase____doubleRainbow() async throws { #expect( camelCase("Double Rainbow") == "doubleRainbow") } +@Test func pascalCase___doubleRainbow() async throws { #expect( pascalCase("Double Rainbow") == "DoubleRainbow") } +@Test func kebabCase____doubleRainbow() async throws { #expect( kebabCase("Double Rainbow") == "double-rainbow") } +@Test func snakeCase____doubleRainbow() async throws { #expect( snakeCase("Double Rainbow") == "double_rainbow") } +@Test func constantCase_doubleRainbow() async throws { #expect( constantCase("Double Rainbow") == "DOUBLE_RAINBOW") } +@Test func dotNotation__doubleRainbow() async throws { #expect( dotNotation("Double Rainbow") == "Double.Rainbow") } +@Test func adaCase______doubleRainbow() async throws { #expect( adaCase("Double Rainbow") == "Double_Rainbow") } +@Test func cobolCase____doubleRainbow() async throws { #expect( cobolCase("Double Rainbow") == "DOUBLE-RAINBOW") } +@Test func trainCase____doubleRainbow() async throws { #expect( trainCase("Double Rainbow") == "Double-Rainbow") } +@Test func spaceCase____doubleRainbow() async throws { #expect( spaceCase("Double Rainbow") == "Double Rainbow") } +@Test func pathCase_____doubleRainbow() async throws { #expect( pathCase("Double Rainbow") == "Double/Rainbow") } +@Test func lowerCase____doubleRainbow() async throws { #expect( lowerCase("Double Rainbow") == "double rainbow") } +@Test func upperCase____doubleRainbow() async throws { #expect( upperCase("Double Rainbow") == "DOUBLE RAINBOW") } +@Test func capitalCase__doubleRainbow() async throws { #expect( capitalCase("Double Rainbow") == "Double Rainbow") } /// Default normalization in Swift (NFC) func n (_ str: String) -> String { str.precomposedStringWithCanonicalMapping } @@ -249,297 +246,295 @@ func n (_ str: String) -> String { str.precomposedStringWithCanonicalMapping } // special characters with Canonical Composition: let specialCharsNFCSpaces = "Ågård î garçons Çafé château voilà ñoël été l'aïeul Ågård ÀÖØß àöøÿ".precomposedStringWithCanonicalMapping // NFC normalization -func testCamelCase____specialCharsNfcSpaces() { XCTAssertEqual(n( camelCase(specialCharsNFCSpaces)), n("agardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } -func testPascalCase___specialCharsNfcSpaces() { XCTAssertEqual(n( pascalCase(specialCharsNFCSpaces)), n("AgardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } -func testKebabCase____specialCharsNfcSpaces() { XCTAssertEqual(n( kebabCase(specialCharsNFCSpaces)), n("agard-i-garcons-cafe-chateau-voila-noel-ete-laieul-agard-aoøß-aoøy")) } -func testSnakeCase____specialCharsNfcSpaces() { XCTAssertEqual(n( snakeCase(specialCharsNFCSpaces)), n("agard_i_garcons_cafe_chateau_voila_noel_ete_laieul_agard_aoøß_aoøy")) } -func testConstantCase_specialCharsNfcSpaces() { XCTAssertEqual(n( constantCase(specialCharsNFCSpaces)), n("AGARD_I_GARCONS_CAFE_CHATEAU_VOILA_NOEL_ETE_LAIEUL_AGARD_AOØSS_AOØY")) } -func testDotNotation__specialCharsNfcSpaces() { XCTAssertEqual(n( dotNotation(specialCharsNFCSpaces)), n("Agard.i.garcons.Cafe.chateau.voila.noel.ete.laieul.Agard.AOØß.aoøy")) } -func testAdaCase______specialCharsNfcSpaces() { XCTAssertEqual(n( adaCase(specialCharsNFCSpaces)), n("Agard_I_Garcons_Cafe_Chateau_Voila_Noel_Ete_Laieul_Agard_Aoøß_Aoøy")) } -func testCobolCase____specialCharsNfcSpaces() { XCTAssertEqual(n( cobolCase(specialCharsNFCSpaces)), n("AGARD-I-GARCONS-CAFE-CHATEAU-VOILA-NOEL-ETE-LAIEUL-AGARD-AOØSS-AOØY")) } -func testTrainCase____specialCharsNfcSpaces() { XCTAssertEqual(n( trainCase(specialCharsNFCSpaces)), n("Agard-I-Garcons-Cafe-Chateau-Voila-Noel-Ete-Laieul-Agard-Aoøß-Aoøy")) } -func testSpaceCase____specialCharsNfcSpaces() { XCTAssertEqual(n( spaceCase(specialCharsNFCSpaces)), n("Ågård î garçons Çafé château voilà ñoël été l'aïeul Ågård ÀÖØß àöøÿ")) } -func testPathCase_____specialCharsNfcSpaces() { XCTAssertEqual(n( pathCase(specialCharsNFCSpaces)), n("Ågård/î/garçons/Çafé/château/voilà/ñoël/été/l'aïeul/Ågård/ÀÖØß/àöøÿ")) } -func testLowerCase____specialCharsNfcSpaces() { XCTAssertEqual(n( lowerCase(specialCharsNFCSpaces)), n("ågård î garçons çafé château voilà ñoël été l'aïeul ågård àöøß àöøÿ")) } -func testUpperCase____specialCharsNfcSpaces() { XCTAssertEqual(n( upperCase(specialCharsNFCSpaces)), n("ÅGÅRD Î GARÇONS ÇAFÉ CHÂTEAU VOILÀ ÑOËL ÉTÉ L'AÏEUL ÅGÅRD ÀÖØSS ÀÖØŸ")) } -func testCapitalCase__specialCharsNfcSpaces() { XCTAssertEqual(n( capitalCase(specialCharsNFCSpaces)), n("Ågård Î Garçons Çafé Château Voilà Ñoël Été L'aïeul Ågård Àöøß Àöøÿ")) } +@Test func camelCase____specialCharsNfcSpaces() async throws { #expect(n( camelCase(specialCharsNFCSpaces)) == n("agardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } +@Test func pascalCase___specialCharsNfcSpaces() async throws { #expect(n( pascalCase(specialCharsNFCSpaces)) == n("AgardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } +@Test func kebabCase____specialCharsNfcSpaces() async throws { #expect(n( kebabCase(specialCharsNFCSpaces)) == n("agard-i-garcons-cafe-chateau-voila-noel-ete-laieul-agard-aoøß-aoøy")) } +@Test func snakeCase____specialCharsNfcSpaces() async throws { #expect(n( snakeCase(specialCharsNFCSpaces)) == n("agard_i_garcons_cafe_chateau_voila_noel_ete_laieul_agard_aoøß_aoøy")) } +@Test func constantCase_specialCharsNfcSpaces() async throws { #expect(n( constantCase(specialCharsNFCSpaces)) == n("AGARD_I_GARCONS_CAFE_CHATEAU_VOILA_NOEL_ETE_LAIEUL_AGARD_AOØSS_AOØY")) } +@Test func dotNotation__specialCharsNfcSpaces() async throws { #expect(n( dotNotation(specialCharsNFCSpaces)) == n("Agard.i.garcons.Cafe.chateau.voila.noel.ete.laieul.Agard.AOØß.aoøy")) } +@Test func adaCase______specialCharsNfcSpaces() async throws { #expect(n( adaCase(specialCharsNFCSpaces)) == n("Agard_I_Garcons_Cafe_Chateau_Voila_Noel_Ete_Laieul_Agard_Aoøß_Aoøy")) } +@Test func cobolCase____specialCharsNfcSpaces() async throws { #expect(n( cobolCase(specialCharsNFCSpaces)) == n("AGARD-I-GARCONS-CAFE-CHATEAU-VOILA-NOEL-ETE-LAIEUL-AGARD-AOØSS-AOØY")) } +@Test func trainCase____specialCharsNfcSpaces() async throws { #expect(n( trainCase(specialCharsNFCSpaces)) == n("Agard-I-Garcons-Cafe-Chateau-Voila-Noel-Ete-Laieul-Agard-Aoøß-Aoøy")) } +@Test func spaceCase____specialCharsNfcSpaces() async throws { #expect(n( spaceCase(specialCharsNFCSpaces)) == n("Ågård î garçons Çafé château voilà ñoël été l'aïeul Ågård ÀÖØß àöøÿ")) } +@Test func pathCase_____specialCharsNfcSpaces() async throws { #expect(n( pathCase(specialCharsNFCSpaces)) == n("Ågård/î/garçons/Çafé/château/voilà/ñoël/été/l'aïeul/Ågård/ÀÖØß/àöøÿ")) } +@Test func lowerCase____specialCharsNfcSpaces() async throws { #expect(n( lowerCase(specialCharsNFCSpaces)) == n("ågård î garçons çafé château voilà ñoël été l'aïeul ågård àöøß àöøÿ")) } +@Test func upperCase____specialCharsNfcSpaces() async throws { #expect(n( upperCase(specialCharsNFCSpaces)) == n("ÅGÅRD Î GARÇONS ÇAFÉ CHÂTEAU VOILÀ ÑOËL ÉTÉ L'AÏEUL ÅGÅRD ÀÖØSS ÀÖØŸ")) } +@Test func capitalCase__specialCharsNfcSpaces() async throws { #expect(n( capitalCase(specialCharsNFCSpaces)) == n("Ågård Î Garçons Çafé Château Voilà Ñoël Été L'aïeul Ågård Àöøß Àöøÿ")) } // special characters with Canonical Decomposition: let specialCharsNFDSpaces = "Ågård î garçons Çafé château voilà ñoël été l'aïeul Ågård ÀÖØß àöøÿ".decomposedStringWithCanonicalMapping // NFD normalization -func testCamelCase____specialCharsNfdSpaces() { XCTAssertEqual(n( camelCase(specialCharsNFDSpaces)), n("agardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } -func testPascalCase___specialCharsNfdSpaces() { XCTAssertEqual(n( pascalCase(specialCharsNFDSpaces)), n("AgardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } -func testKebabCase____specialCharsNfdSpaces() { XCTAssertEqual(n( kebabCase(specialCharsNFDSpaces)), n("agard-i-garcons-cafe-chateau-voila-noel-ete-laieul-agard-aoøß-aoøy")) } -func testSnakeCase____specialCharsNfdSpaces() { XCTAssertEqual(n( snakeCase(specialCharsNFDSpaces)), n("agard_i_garcons_cafe_chateau_voila_noel_ete_laieul_agard_aoøß_aoøy")) } -func testConstantCase_specialCharsNfdSpaces() { XCTAssertEqual(n( constantCase(specialCharsNFDSpaces)), n("AGARD_I_GARCONS_CAFE_CHATEAU_VOILA_NOEL_ETE_LAIEUL_AGARD_AOØSS_AOØY")) } -func testDotNotation__specialCharsNfdSpaces() { XCTAssertEqual(n( dotNotation(specialCharsNFDSpaces)), n("Agard.i.garcons.Cafe.chateau.voila.noel.ete.laieul.Agard.AOØß.aoøy")) } -func testAdaCase______specialCharsNfdSpaces() { XCTAssertEqual(n( adaCase(specialCharsNFDSpaces)), n("Agard_I_Garcons_Cafe_Chateau_Voila_Noel_Ete_Laieul_Agard_Aoøß_Aoøy")) } -func testCobolCase____specialCharsNfdSpaces() { XCTAssertEqual(n( cobolCase(specialCharsNFDSpaces)), n("AGARD-I-GARCONS-CAFE-CHATEAU-VOILA-NOEL-ETE-LAIEUL-AGARD-AOØSS-AOØY")) } -func testTrainCase____specialCharsNfdSpaces() { XCTAssertEqual(n( trainCase(specialCharsNFDSpaces)), n("Agard-I-Garcons-Cafe-Chateau-Voila-Noel-Ete-Laieul-Agard-Aoøß-Aoøy")) } -func testSpaceCase____specialCharsNfdSpaces() { XCTAssertEqual(n( spaceCase(specialCharsNFDSpaces)), n("Ågård î garçons Çafé château voilà ñoël été l'aïeul Ågård ÀÖØß àöøÿ")) } -func testPathCase_____specialCharsNfdSpaces() { XCTAssertEqual(n( pathCase(specialCharsNFDSpaces)), n("Ågård/î/garçons/Çafé/château/voilà/ñoël/été/l'aïeul/Ågård/ÀÖØß/àöøÿ")) } -func testLowerCase____specialCharsNfdSpaces() { XCTAssertEqual(n( lowerCase(specialCharsNFDSpaces)), n("ågård î garçons çafé château voilà ñoël été l'aïeul ågård àöøß àöøÿ")) } -func testUpperCase____specialCharsNfdSpaces() { XCTAssertEqual(n( upperCase(specialCharsNFDSpaces)), n("ÅGÅRD Î GARÇONS ÇAFÉ CHÂTEAU VOILÀ ÑOËL ÉTÉ L'AÏEUL ÅGÅRD ÀÖØSS ÀÖØŸ")) } -func testCapitalCase__specialCharsNfdSpaces() { XCTAssertEqual(n( capitalCase(specialCharsNFDSpaces)), n("Ågård Î Garçons Çafé Château Voilà Ñoël Été L'aïeul Ågård Àöøß Àöøÿ")) } +@Test func camelCase____specialCharsNfdSpaces() async throws { #expect(n( camelCase(specialCharsNFDSpaces)) == n("agardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } +@Test func pascalCase___specialCharsNfdSpaces() async throws { #expect(n( pascalCase(specialCharsNFDSpaces)) == n("AgardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } +@Test func kebabCase____specialCharsNfdSpaces() async throws { #expect(n( kebabCase(specialCharsNFDSpaces)) == n("agard-i-garcons-cafe-chateau-voila-noel-ete-laieul-agard-aoøß-aoøy")) } +@Test func snakeCase____specialCharsNfdSpaces() async throws { #expect(n( snakeCase(specialCharsNFDSpaces)) == n("agard_i_garcons_cafe_chateau_voila_noel_ete_laieul_agard_aoøß_aoøy")) } +@Test func constantCase_specialCharsNfdSpaces() async throws { #expect(n( constantCase(specialCharsNFDSpaces)) == n("AGARD_I_GARCONS_CAFE_CHATEAU_VOILA_NOEL_ETE_LAIEUL_AGARD_AOØSS_AOØY")) } +@Test func dotNotation__specialCharsNfdSpaces() async throws { #expect(n( dotNotation(specialCharsNFDSpaces)) == n("Agard.i.garcons.Cafe.chateau.voila.noel.ete.laieul.Agard.AOØß.aoøy")) } +@Test func adaCase______specialCharsNfdSpaces() async throws { #expect(n( adaCase(specialCharsNFDSpaces)) == n("Agard_I_Garcons_Cafe_Chateau_Voila_Noel_Ete_Laieul_Agard_Aoøß_Aoøy")) } +@Test func cobolCase____specialCharsNfdSpaces() async throws { #expect(n( cobolCase(specialCharsNFDSpaces)) == n("AGARD-I-GARCONS-CAFE-CHATEAU-VOILA-NOEL-ETE-LAIEUL-AGARD-AOØSS-AOØY")) } +@Test func trainCase____specialCharsNfdSpaces() async throws { #expect(n( trainCase(specialCharsNFDSpaces)) == n("Agard-I-Garcons-Cafe-Chateau-Voila-Noel-Ete-Laieul-Agard-Aoøß-Aoøy")) } +@Test func spaceCase____specialCharsNfdSpaces() async throws { #expect(n( spaceCase(specialCharsNFDSpaces)) == n("Ågård î garçons Çafé château voilà ñoël été l'aïeul Ågård ÀÖØß àöøÿ")) } +@Test func pathCase_____specialCharsNfdSpaces() async throws { #expect(n( pathCase(specialCharsNFDSpaces)) == n("Ågård/î/garçons/Çafé/château/voilà/ñoël/été/l'aïeul/Ågård/ÀÖØß/àöøÿ")) } +@Test func lowerCase____specialCharsNfdSpaces() async throws { #expect(n( lowerCase(specialCharsNFDSpaces)) == n("ågård î garçons çafé château voilà ñoël été l'aïeul ågård àöøß àöøÿ")) } +@Test func upperCase____specialCharsNfdSpaces() async throws { #expect(n( upperCase(specialCharsNFDSpaces)) == n("ÅGÅRD Î GARÇONS ÇAFÉ CHÂTEAU VOILÀ ÑOËL ÉTÉ L'AÏEUL ÅGÅRD ÀÖØSS ÀÖØŸ")) } +@Test func capitalCase__specialCharsNfdSpaces() async throws { #expect(n( capitalCase(specialCharsNFDSpaces)) == n("Ågård Î Garçons Çafé Château Voilà Ñoël Été L'aïeul Ågård Àöøß Àöøÿ")) } // special characters with Canonical Composition without spaces: let specialCharsNFC = "Ågård_î_garçons_Çafé_château_voilà_ñoël_été_laïeul_Ågård_ÀÖØß_àöøÿ".precomposedStringWithCanonicalMapping // NFC normalization -func testCamelCase____specialCharsNfc() { XCTAssertEqual(n( camelCase(specialCharsNFC)), n("agardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } -func testPascalCase___specialCharsNfc() { XCTAssertEqual(n( pascalCase(specialCharsNFC)), n("AgardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } -func testKebabCase____specialCharsNfc() { XCTAssertEqual(n( kebabCase(specialCharsNFC)), n("agard-i-garcons-cafe-chateau-voila-noel-ete-laieul-agard-aoøß-aoøy")) } -func testSnakeCase____specialCharsNfc() { XCTAssertEqual(n( snakeCase(specialCharsNFC)), n("agard_i_garcons_cafe_chateau_voila_noel_ete_laieul_agard_aoøß_aoøy")) } -func testConstantCase_specialCharsNfc() { XCTAssertEqual(n( constantCase(specialCharsNFC)), n("AGARD_I_GARCONS_CAFE_CHATEAU_VOILA_NOEL_ETE_LAIEUL_AGARD_AOØSS_AOØY")) } -func testDotNotation__specialCharsNfc() { XCTAssertEqual(n( dotNotation(specialCharsNFC)), n("Agard.i.garcons.Cafe.chateau.voila.noel.ete.laieul.Agard.AOØß.aoøy")) } -func testAdaCase______specialCharsNfc() { XCTAssertEqual(n( adaCase(specialCharsNFC)), n("Agard_I_Garcons_Cafe_Chateau_Voila_Noel_Ete_Laieul_Agard_Aoøß_Aoøy")) } -func testCobolCase____specialCharsNfc() { XCTAssertEqual(n( cobolCase(specialCharsNFC)), n("AGARD-I-GARCONS-CAFE-CHATEAU-VOILA-NOEL-ETE-LAIEUL-AGARD-AOØSS-AOØY")) } -func testTrainCase____specialCharsNfc() { XCTAssertEqual(n( trainCase(specialCharsNFC)), n("Agard-I-Garcons-Cafe-Chateau-Voila-Noel-Ete-Laieul-Agard-Aoøß-Aoøy")) } -func testSpaceCase____specialCharsNfc() { XCTAssertEqual(n( spaceCase(specialCharsNFC)), n("Ågård_î_garçons_Çafé_château_voilà_ñoël_été_laïeul_Ågård_ÀÖØß_àöøÿ")) } -func testPathCase_____specialCharsNfc() { XCTAssertEqual(n( pathCase(specialCharsNFC)), n("Ågård/_î/_garçons/_Çafé/_château/_voilà/_ñoël/_été/_laïeul/_Ågård/_ÀÖØß/_àöøÿ")) } -func testLowerCase____specialCharsNfc() { XCTAssertEqual(n( lowerCase(specialCharsNFC)), n("ågård_î_garçons_çafé_château_voilà_ñoël_été_laïeul_ågård_àöøß_àöøÿ")) } -func testUpperCase____specialCharsNfc() { XCTAssertEqual(n( upperCase(specialCharsNFC)), n("ÅGÅRD_Î_GARÇONS_ÇAFÉ_CHÂTEAU_VOILÀ_ÑOËL_ÉTÉ_LAÏEUL_ÅGÅRD_ÀÖØSS_ÀÖØŸ")) } -func testCapitalCase__specialCharsNfc() { XCTAssertEqual(n( capitalCase(specialCharsNFC)), n("Ågård_Î_Garçons_Çafé_Château_Voilà_Ñoël_Été_Laïeul_Ågård_Àöøß_Àöøÿ")) } +@Test func camelCase____specialCharsNfc() async throws { #expect(n( camelCase(specialCharsNFC)) == n("agardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } +@Test func pascalCase___specialCharsNfc() async throws { #expect(n( pascalCase(specialCharsNFC)) == n("AgardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } +@Test func kebabCase____specialCharsNfc() async throws { #expect(n( kebabCase(specialCharsNFC)) == n("agard-i-garcons-cafe-chateau-voila-noel-ete-laieul-agard-aoøß-aoøy")) } +@Test func snakeCase____specialCharsNfc() async throws { #expect(n( snakeCase(specialCharsNFC)) == n("agard_i_garcons_cafe_chateau_voila_noel_ete_laieul_agard_aoøß_aoøy")) } +@Test func constantCase_specialCharsNfc() async throws { #expect(n( constantCase(specialCharsNFC)) == n("AGARD_I_GARCONS_CAFE_CHATEAU_VOILA_NOEL_ETE_LAIEUL_AGARD_AOØSS_AOØY")) } +@Test func dotNotation__specialCharsNfc() async throws { #expect(n( dotNotation(specialCharsNFC)) == n("Agard.i.garcons.Cafe.chateau.voila.noel.ete.laieul.Agard.AOØß.aoøy")) } +@Test func adaCase______specialCharsNfc() async throws { #expect(n( adaCase(specialCharsNFC)) == n("Agard_I_Garcons_Cafe_Chateau_Voila_Noel_Ete_Laieul_Agard_Aoøß_Aoøy")) } +@Test func cobolCase____specialCharsNfc() async throws { #expect(n( cobolCase(specialCharsNFC)) == n("AGARD-I-GARCONS-CAFE-CHATEAU-VOILA-NOEL-ETE-LAIEUL-AGARD-AOØSS-AOØY")) } +@Test func trainCase____specialCharsNfc() async throws { #expect(n( trainCase(specialCharsNFC)) == n("Agard-I-Garcons-Cafe-Chateau-Voila-Noel-Ete-Laieul-Agard-Aoøß-Aoøy")) } +@Test func spaceCase____specialCharsNfc() async throws { #expect(n( spaceCase(specialCharsNFC)) == n("Ågård_î_garçons_Çafé_château_voilà_ñoël_été_laïeul_Ågård_ÀÖØß_àöøÿ")) } +@Test func pathCase_____specialCharsNfc() async throws { #expect(n( pathCase(specialCharsNFC)) == n("Ågård/_î/_garçons/_Çafé/_château/_voilà/_ñoël/_été/_laïeul/_Ågård/_ÀÖØß/_àöøÿ")) } +@Test func lowerCase____specialCharsNfc() async throws { #expect(n( lowerCase(specialCharsNFC)) == n("ågård_î_garçons_çafé_château_voilà_ñoël_été_laïeul_ågård_àöøß_àöøÿ")) } +@Test func upperCase____specialCharsNfc() async throws { #expect(n( upperCase(specialCharsNFC)) == n("ÅGÅRD_Î_GARÇONS_ÇAFÉ_CHÂTEAU_VOILÀ_ÑOËL_ÉTÉ_LAÏEUL_ÅGÅRD_ÀÖØSS_ÀÖØŸ")) } +@Test func capitalCase__specialCharsNfc() async throws { #expect(n( capitalCase(specialCharsNFC)) == n("Ågård_Î_Garçons_Çafé_Château_Voilà_Ñoël_Été_Laïeul_Ågård_Àöøß_Àöøÿ")) } // special characters with Canonical Decomposition without spaces: let specialCharsNFD = "Ågård_î_garçons_Çafé_château_voilà_ñoël_été_laïeul_Ågård_ÀÖØß_àöøÿ".decomposedStringWithCanonicalMapping // NFD normalization -func testCamelCase____specialCharsNfd() { XCTAssertEqual(n( camelCase(specialCharsNFD)), n("agardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } -func testPascalCase___specialCharsNfd() { XCTAssertEqual(n( pascalCase(specialCharsNFD)), n("AgardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } -func testKebabCase____specialCharsNfd() { XCTAssertEqual(n( kebabCase(specialCharsNFD)), n("agard-i-garcons-cafe-chateau-voila-noel-ete-laieul-agard-aoøß-aoøy")) } -func testSnakeCase____specialCharsNfd() { XCTAssertEqual(n( snakeCase(specialCharsNFD)), n("agard_i_garcons_cafe_chateau_voila_noel_ete_laieul_agard_aoøß_aoøy")) } -func testConstantCase_specialCharsNfd() { XCTAssertEqual(n( constantCase(specialCharsNFD)), n("AGARD_I_GARCONS_CAFE_CHATEAU_VOILA_NOEL_ETE_LAIEUL_AGARD_AOØSS_AOØY")) } -func testDotNotation__specialCharsNfd() { XCTAssertEqual(n( dotNotation(specialCharsNFD)), n("Agard.i.garcons.Cafe.chateau.voila.noel.ete.laieul.Agard.AOØß.aoøy")) } -func testAdaCase______specialCharsNfd() { XCTAssertEqual(n( adaCase(specialCharsNFD)), n("Agard_I_Garcons_Cafe_Chateau_Voila_Noel_Ete_Laieul_Agard_Aoøß_Aoøy")) } -func testCobolCase____specialCharsNfd() { XCTAssertEqual(n( cobolCase(specialCharsNFD)), n("AGARD-I-GARCONS-CAFE-CHATEAU-VOILA-NOEL-ETE-LAIEUL-AGARD-AOØSS-AOØY")) } -func testTrainCase____specialCharsNfd() { XCTAssertEqual(n( trainCase(specialCharsNFD)), n("Agard-I-Garcons-Cafe-Chateau-Voila-Noel-Ete-Laieul-Agard-Aoøß-Aoøy")) } -func testSpaceCase____specialCharsNfd() { XCTAssertEqual(n( spaceCase(specialCharsNFD)), n("Ågård_î_garçons_Çafé_château_voilà_ñoël_été_laïeul_Ågård_ÀÖØß_àöøÿ")) } -func testPathCase_____specialCharsNfd() { XCTAssertEqual(n( pathCase(specialCharsNFD)), n("Ågård/_î/_garçons/_Çafé/_château/_voilà/_ñoël/_été/_laïeul/_Ågård/_ÀÖØß/_àöøÿ")) } -func testLowerCase____specialCharsNfd() { XCTAssertEqual(n( lowerCase(specialCharsNFD)), n("ågård_î_garçons_çafé_château_voilà_ñoël_été_laïeul_ågård_àöøß_àöøÿ")) } -func testUpperCase____specialCharsNfd() { XCTAssertEqual(n( upperCase(specialCharsNFD)), n("ÅGÅRD_Î_GARÇONS_ÇAFÉ_CHÂTEAU_VOILÀ_ÑOËL_ÉTÉ_LAÏEUL_ÅGÅRD_ÀÖØSS_ÀÖØŸ")) } -func testCapitalCase__specialCharsNfd() { XCTAssertEqual(n( capitalCase(specialCharsNFD)), n("Ågård_Î_Garçons_Çafé_Château_Voilà_Ñoël_Été_Laïeul_Ågård_Àöøß_Àöøÿ")) } +@Test func camelCase____specialCharsNfd() async throws { #expect(n( camelCase(specialCharsNFD)) == n("agardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } +@Test func pascalCase___specialCharsNfd() async throws { #expect(n( pascalCase(specialCharsNFD)) == n("AgardIGarconsCafeChateauVoilaNoelEteLaieulAgardAoøßAoøy")) } +@Test func kebabCase____specialCharsNfd() async throws { #expect(n( kebabCase(specialCharsNFD)) == n("agard-i-garcons-cafe-chateau-voila-noel-ete-laieul-agard-aoøß-aoøy")) } +@Test func snakeCase____specialCharsNfd() async throws { #expect(n( snakeCase(specialCharsNFD)) == n("agard_i_garcons_cafe_chateau_voila_noel_ete_laieul_agard_aoøß_aoøy")) } +@Test func constantCase_specialCharsNfd() async throws { #expect(n( constantCase(specialCharsNFD)) == n("AGARD_I_GARCONS_CAFE_CHATEAU_VOILA_NOEL_ETE_LAIEUL_AGARD_AOØSS_AOØY")) } +@Test func dotNotation__specialCharsNfd() async throws { #expect(n( dotNotation(specialCharsNFD)) == n("Agard.i.garcons.Cafe.chateau.voila.noel.ete.laieul.Agard.AOØß.aoøy")) } +@Test func adaCase______specialCharsNfd() async throws { #expect(n( adaCase(specialCharsNFD)) == n("Agard_I_Garcons_Cafe_Chateau_Voila_Noel_Ete_Laieul_Agard_Aoøß_Aoøy")) } +@Test func cobolCase____specialCharsNfd() async throws { #expect(n( cobolCase(specialCharsNFD)) == n("AGARD-I-GARCONS-CAFE-CHATEAU-VOILA-NOEL-ETE-LAIEUL-AGARD-AOØSS-AOØY")) } +@Test func trainCase____specialCharsNfd() async throws { #expect(n( trainCase(specialCharsNFD)) == n("Agard-I-Garcons-Cafe-Chateau-Voila-Noel-Ete-Laieul-Agard-Aoøß-Aoøy")) } +@Test func spaceCase____specialCharsNfd() async throws { #expect(n( spaceCase(specialCharsNFD)) == n("Ågård_î_garçons_Çafé_château_voilà_ñoël_été_laïeul_Ågård_ÀÖØß_àöøÿ")) } +@Test func pathCase_____specialCharsNfd() async throws { #expect(n( pathCase(specialCharsNFD)) == n("Ågård/_î/_garçons/_Çafé/_château/_voilà/_ñoël/_été/_laïeul/_Ågård/_ÀÖØß/_àöøÿ")) } +@Test func lowerCase____specialCharsNfd() async throws { #expect(n( lowerCase(specialCharsNFD)) == n("ågård_î_garçons_çafé_château_voilà_ñoël_été_laïeul_ågård_àöøß_àöøÿ")) } +@Test func upperCase____specialCharsNfd() async throws { #expect(n( upperCase(specialCharsNFD)) == n("ÅGÅRD_Î_GARÇONS_ÇAFÉ_CHÂTEAU_VOILÀ_ÑOËL_ÉTÉ_LAÏEUL_ÅGÅRD_ÀÖØSS_ÀÖØŸ")) } +@Test func capitalCase__specialCharsNfd() async throws { #expect(n( capitalCase(specialCharsNFD)) == n("Ågård_Î_Garçons_Çafé_Château_Voilà_Ñoël_Été_Laïeul_Ågård_Àöøß_Àöøÿ")) } // special characters with Canonical Composition without spaces - short example: -func testCamelCase____specialCharsNfcShort() { XCTAssertEqual(n( camelCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("cafeAgard")) } -func testPascalCase___specialCharsNfcShort() { XCTAssertEqual(n( pascalCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("CafeAgard")) } -func testKebabCase____specialCharsNfcShort() { XCTAssertEqual(n( kebabCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("cafe-agard")) } -func testSnakeCase____specialCharsNfcShort() { XCTAssertEqual(n( snakeCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("cafe_agard")) } -func testConstantCase_specialCharsNfcShort() { XCTAssertEqual(n( constantCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("CAFE_AGARD")) } -func testDotNotation__specialCharsNfcShort() { XCTAssertEqual(n( dotNotation("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("Cafe.Agard")) } -func testAdaCase______specialCharsNfcShort() { XCTAssertEqual(n( adaCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("Cafe_Agard")) } -func testCobolCase____specialCharsNfcShort() { XCTAssertEqual(n( cobolCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("CAFE-AGARD")) } -func testTrainCase____specialCharsNfcShort() { XCTAssertEqual(n( trainCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("Cafe-Agard")) } -func testSpaceCase____specialCharsNfcShort() { XCTAssertEqual(n( spaceCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("Çafé Ågård")) } -func testPathCase_____specialCharsNfcShort() { XCTAssertEqual(n( pathCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("Çafé/Ågård")) } -func testLowerCase____specialCharsNfcShort() { XCTAssertEqual(n( lowerCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("çafé ågård")) } -func testUpperCase____specialCharsNfcShort() { XCTAssertEqual(n( upperCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("ÇAFÉ ÅGÅRD")) } -func testCapitalCase__specialCharsNfcShort() { XCTAssertEqual(n( capitalCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)), n("Çafé Ågård")) } +@Test func camelCase____specialCharsNfcShort() async throws { #expect(n( camelCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("cafeAgard")) } +@Test func pascalCase___specialCharsNfcShort() async throws { #expect(n( pascalCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("CafeAgard")) } +@Test func kebabCase____specialCharsNfcShort() async throws { #expect(n( kebabCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("cafe-agard")) } +@Test func snakeCase____specialCharsNfcShort() async throws { #expect(n( snakeCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("cafe_agard")) } +@Test func constantCase_specialCharsNfcShort() async throws { #expect(n( constantCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("CAFE_AGARD")) } +@Test func dotNotation__specialCharsNfcShort() async throws { #expect(n( dotNotation("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("Cafe.Agard")) } +@Test func adaCase______specialCharsNfcShort() async throws { #expect(n( adaCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("Cafe_Agard")) } +@Test func cobolCase____specialCharsNfcShort() async throws { #expect(n( cobolCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("CAFE-AGARD")) } +@Test func trainCase____specialCharsNfcShort() async throws { #expect(n( trainCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("Cafe-Agard")) } +@Test func spaceCase____specialCharsNfcShort() async throws { #expect(n( spaceCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("Çafé Ågård")) } +@Test func pathCase_____specialCharsNfcShort() async throws { #expect(n( pathCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("Çafé/Ågård")) } +@Test func lowerCase____specialCharsNfcShort() async throws { #expect(n( lowerCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("çafé ågård")) } +@Test func upperCase____specialCharsNfcShort() async throws { #expect(n( upperCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("ÇAFÉ ÅGÅRD")) } +@Test func capitalCase__specialCharsNfcShort() async throws { #expect(n( capitalCase("ÇaféÅgård".precomposedStringWithCanonicalMapping)) == n("Çafé Ågård")) } // special characters with Canonical Decomposition without spaces - short example: -func testCamelCase____specialCharsNfdShort() { XCTAssertEqual(n( camelCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("cafeAgard")) } -func testPascalCase___specialCharsNfdShort() { XCTAssertEqual(n( pascalCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("CafeAgard")) } -func testKebabCase____specialCharsNfdShort() { XCTAssertEqual(n( kebabCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("cafe-agard")) } -func testSnakeCase____specialCharsNfdShort() { XCTAssertEqual(n( snakeCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("cafe_agard")) } -func testConstantCase_specialCharsNfdShort() { XCTAssertEqual(n( constantCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("CAFE_AGARD")) } -func testDotNotation__specialCharsNfdShort() { XCTAssertEqual(n( dotNotation("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("Cafe.Agard")) } -func testAdaCase______specialCharsNfdShort() { XCTAssertEqual(n( adaCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("Cafe_Agard")) } -func testCobolCase____specialCharsNfdShort() { XCTAssertEqual(n( cobolCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("CAFE-AGARD")) } -func testTrainCase____specialCharsNfdShort() { XCTAssertEqual(n( trainCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("Cafe-Agard")) } -func testSpaceCase____specialCharsNfdShort() { XCTAssertEqual(n( spaceCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("Çafé Ågård")) } -func testPathCase_____specialCharsNfdShort() { XCTAssertEqual(n( pathCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("Çafé/Ågård")) } -func testLowerCase____specialCharsNfdShort() { XCTAssertEqual(n( lowerCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("çafé ågård")) } -func testUpperCase____specialCharsNfdShort() { XCTAssertEqual(n( upperCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("ÇAFÉ ÅGÅRD")) } -func testCapitalCase__specialCharsNfdShort() { XCTAssertEqual(n( capitalCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)), n("Çafé Ågård")) } +@Test func camelCase____specialCharsNfdShort() async throws { #expect(n( camelCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("cafeAgard")) } +@Test func pascalCase___specialCharsNfdShort() async throws { #expect(n( pascalCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("CafeAgard")) } +@Test func kebabCase____specialCharsNfdShort() async throws { #expect(n( kebabCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("cafe-agard")) } +@Test func snakeCase____specialCharsNfdShort() async throws { #expect(n( snakeCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("cafe_agard")) } +@Test func constantCase_specialCharsNfdShort() async throws { #expect(n( constantCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("CAFE_AGARD")) } +@Test func dotNotation__specialCharsNfdShort() async throws { #expect(n( dotNotation("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("Cafe.Agard")) } +@Test func adaCase______specialCharsNfdShort() async throws { #expect(n( adaCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("Cafe_Agard")) } +@Test func cobolCase____specialCharsNfdShort() async throws { #expect(n( cobolCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("CAFE-AGARD")) } +@Test func trainCase____specialCharsNfdShort() async throws { #expect(n( trainCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("Cafe-Agard")) } +@Test func spaceCase____specialCharsNfdShort() async throws { #expect(n( spaceCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("Çafé Ågård")) } +@Test func pathCase_____specialCharsNfdShort() async throws { #expect(n( pathCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("Çafé/Ågård")) } +@Test func lowerCase____specialCharsNfdShort() async throws { #expect(n( lowerCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("çafé ågård")) } +@Test func upperCase____specialCharsNfdShort() async throws { #expect(n( upperCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("ÇAFÉ ÅGÅRD")) } +@Test func capitalCase__specialCharsNfdShort() async throws { #expect(n( capitalCase("ÇaféÅgård".decomposedStringWithCanonicalMapping)) == n("Çafé Ågård")) } // No spaces involved -func testCamelCase____removeSpecialCharacters() { XCTAssertEqual( camelCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), "mesqueebBluesJazzGithubCom") } -func testCamelCase______keepSpecialCharacters() { XCTAssertEqual( camelCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ), "$mesqueeb.bluesJazz@github.com") } -func testPascalCase___removeSpecialCharacters() { XCTAssertEqual( pascalCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), "MesqueebBluesJazzGithubCom") } -func testPascalCase_____keepSpecialCharacters() { XCTAssertEqual( pascalCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ), "$Mesqueeb.BluesJazz@Github.Com") } -func testKebabCase____removeSpecialCharacters() { XCTAssertEqual( kebabCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), "mesqueeb-blues-jazz-github-com") } -func testKebabCase______keepSpecialCharacters() { XCTAssertEqual( kebabCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ), "$mesqueeb.blues-jazz@github.com") } -func testSnakeCase____removeSpecialCharacters() { XCTAssertEqual( snakeCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), "mesqueeb_blues_jazz_github_com") } -func testSnakeCase______keepSpecialCharacters() { XCTAssertEqual( snakeCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ), "$mesqueeb.blues_jazz@github.com") } -func testConstantCase_removeSpecialCharacters() { XCTAssertEqual( constantCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), "MESQUEEB_BLUES_JAZZ_GITHUB_COM") } -func testConstantCase___keepSpecialCharacters() { XCTAssertEqual( constantCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ), "$MESQUEEB.BLUES_JAZZ@GITHUB.COM") } +@Test func camelCase____removeSpecialCharacters() async throws { #expect( camelCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == "mesqueebBluesJazzGithubCom") } +@Test func camelCase______keepSpecialCharacters() async throws { #expect( camelCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ) == "$mesqueeb.bluesJazz@github.com") } +@Test func pascalCase___removeSpecialCharacters() async throws { #expect( pascalCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == "MesqueebBluesJazzGithubCom") } +@Test func pascalCase_____keepSpecialCharacters() async throws { #expect( pascalCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ) == "$Mesqueeb.BluesJazz@Github.Com") } +@Test func kebabCase____removeSpecialCharacters() async throws { #expect( kebabCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == "mesqueeb-blues-jazz-github-com") } +@Test func kebabCase______keepSpecialCharacters() async throws { #expect( kebabCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ) == "$mesqueeb.blues-jazz@github.com") } +@Test func snakeCase____removeSpecialCharacters() async throws { #expect( snakeCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == "mesqueeb_blues_jazz_github_com") } +@Test func snakeCase______keepSpecialCharacters() async throws { #expect( snakeCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ) == "$mesqueeb.blues_jazz@github.com") } +@Test func constantCase_removeSpecialCharacters() async throws { #expect( constantCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == "MESQUEEB_BLUES_JAZZ_GITHUB_COM") } +@Test func constantCase___keepSpecialCharacters() async throws { #expect( constantCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ) == "$MESQUEEB.BLUES_JAZZ@GITHUB.COM") } -func testSpaceCase___removeSpecialCharacters() { XCTAssertEqual( spaceCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), "mesqueeb Blues Jazz github com") } -func testSpaceCase_____keepSpecialCharacters() { XCTAssertEqual( spaceCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ), "$mesqueeb.Blues Jazz@github.com") } -func testPathCase____removeSpecialCharacters() { XCTAssertEqual( pathCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), "mesqueeb/Blues/Jazz/github/com") } -func testPathCase______keepSpecialCharacters() { XCTAssertEqual( pathCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ), "$mesqueeb/.Blues/Jazz/@github/.com") } -func testLowerCase___removeSpecialCharacters() { XCTAssertEqual( lowerCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), "mesqueeb blues jazz github com") } -func testLowerCase_____keepSpecialCharacters() { XCTAssertEqual( lowerCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ), "$mesqueeb.blues jazz@github.com") } -func testUpperCase___removeSpecialCharacters() { XCTAssertEqual( upperCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), "MESQUEEB BLUES JAZZ GITHUB COM") } -func testUpperCase_____keepSpecialCharacters() { XCTAssertEqual( upperCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ), "$MESQUEEB.BLUES JAZZ@GITHUB.COM") } -func testCapitalCase_removeSpecialCharacters() { XCTAssertEqual( capitalCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), "Mesqueeb Blues Jazz Github Com") } -func testCapitalCase___keepSpecialCharacters() { XCTAssertEqual( capitalCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ), "$Mesqueeb.Blues Jazz@Github.Com") } +@Test func spaceCase___removeSpecialCharacters() async throws { #expect( spaceCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == "mesqueeb Blues Jazz github com") } +@Test func spaceCase_____keepSpecialCharacters() async throws { #expect( spaceCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ) == "$mesqueeb.Blues Jazz@github.com") } +@Test func pathCase____removeSpecialCharacters() async throws { #expect( pathCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == "mesqueeb/Blues/Jazz/github/com") } +@Test func pathCase______keepSpecialCharacters() async throws { #expect( pathCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ) == "$mesqueeb/.Blues/Jazz/@github/.com") } +@Test func lowerCase___removeSpecialCharacters() async throws { #expect( lowerCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == "mesqueeb blues jazz github com") } +@Test func lowerCase_____keepSpecialCharacters() async throws { #expect( lowerCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ) == "$mesqueeb.blues jazz@github.com") } +@Test func upperCase___removeSpecialCharacters() async throws { #expect( upperCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == "MESQUEEB BLUES JAZZ GITHUB COM") } +@Test func upperCase_____keepSpecialCharacters() async throws { #expect( upperCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ) == "$MESQUEEB.BLUES JAZZ@GITHUB.COM") } +@Test func capitalCase_removeSpecialCharacters() async throws { #expect( capitalCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == "Mesqueeb Blues Jazz Github Com") } +@Test func capitalCase___keepSpecialCharacters() async throws { #expect( capitalCase("$mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true ) == "$Mesqueeb.Blues Jazz@Github.Com") } // Spaces involved -func testCamelCase____removeSpecialCharactersSpaces() { XCTAssertEqual( camelCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false), "mesqueebBluesjazzGithubPower") } -func testCamelCase______keepSpecialCharactersSpaces() { XCTAssertEqual( camelCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ), "$mesqueeb.bluesjazz@github_power") } -func testPascalCase___removeSpecialCharactersSpaces() { XCTAssertEqual( pascalCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false), "MesqueebBluesjazzGithubPower") } -func testPascalCase_____keepSpecialCharactersSpaces() { XCTAssertEqual( pascalCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ), "$Mesqueeb.Bluesjazz@Github_Power") } -func testKebabCase____removeSpecialCharactersSpaces() { XCTAssertEqual( kebabCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false), "mesqueeb-bluesjazz-github-power") } -func testKebabCase______keepSpecialCharactersSpaces() { XCTAssertEqual( kebabCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ), "$mesqueeb-.bluesjazz-@github-_power") } -func testSnakeCase____removeSpecialCharactersSpaces() { XCTAssertEqual( snakeCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false), "mesqueeb_bluesjazz_github_power") } -func testSnakeCase______keepSpecialCharactersSpaces() { XCTAssertEqual( snakeCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ), "$mesqueeb_.bluesjazz_@github__power") } -func testConstantCase_removeSpecialCharactersSpaces() { XCTAssertEqual( constantCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false), "MESQUEEB_BLUESJAZZ_GITHUB_POWER") } -func testConstantCase___keepSpecialCharactersSpaces() { XCTAssertEqual( constantCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ), "$MESQUEEB_.BLUESJAZZ_@GITHUB__POWER") } +@Test func camelCase____removeSpecialCharactersSpaces() async throws { #expect( camelCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false) == "mesqueebBluesjazzGithubPower") } +@Test func camelCase______keepSpecialCharactersSpaces() async throws { #expect( camelCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ) == "$mesqueeb.bluesjazz@github_power") } +@Test func pascalCase___removeSpecialCharactersSpaces() async throws { #expect( pascalCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false) == "MesqueebBluesjazzGithubPower") } +@Test func pascalCase_____keepSpecialCharactersSpaces() async throws { #expect( pascalCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ) == "$Mesqueeb.Bluesjazz@Github_Power") } +@Test func kebabCase____removeSpecialCharactersSpaces() async throws { #expect( kebabCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false) == "mesqueeb-bluesjazz-github-power") } +@Test func kebabCase______keepSpecialCharactersSpaces() async throws { #expect( kebabCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ) == "$mesqueeb-.bluesjazz-@github-_power") } +@Test func snakeCase____removeSpecialCharactersSpaces() async throws { #expect( snakeCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false) == "mesqueeb_bluesjazz_github_power") } +@Test func snakeCase______keepSpecialCharactersSpaces() async throws { #expect( snakeCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ) == "$mesqueeb_.bluesjazz_@github__power") } +@Test func constantCase_removeSpecialCharactersSpaces() async throws { #expect( constantCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false) == "MESQUEEB_BLUESJAZZ_GITHUB_POWER") } +@Test func constantCase___keepSpecialCharactersSpaces() async throws { #expect( constantCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ) == "$MESQUEEB_.BLUESJAZZ_@GITHUB__POWER") } -func testSpaceCase___removeSpecialCharactersSpaces() { XCTAssertEqual( spaceCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false), "mesqueeb BluesJazz github POWER") } -func testSpaceCase_____keepSpecialCharactersSpaces() { XCTAssertEqual( spaceCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ), "$mesqueeb .BluesJazz @github _POWER") } -func testPathCase____removeSpecialCharactersSpaces() { XCTAssertEqual( pathCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false), "mesqueeb/BluesJazz/github/POWER") } -func testPathCase______keepSpecialCharactersSpaces() { XCTAssertEqual( pathCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ), "$mesqueeb/.BluesJazz/@github/_POWER") } -func testLowerCase___removeSpecialCharactersSpaces() { XCTAssertEqual( lowerCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false), "mesqueeb bluesjazz github power") } -func testLowerCase_____keepSpecialCharactersSpaces() { XCTAssertEqual( lowerCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ), "$mesqueeb .bluesjazz @github _power") } -func testUpperCase___removeSpecialCharactersSpaces() { XCTAssertEqual( upperCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false), "MESQUEEB BLUESJAZZ GITHUB POWER") } -func testUpperCase_____keepSpecialCharactersSpaces() { XCTAssertEqual( upperCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ), "$MESQUEEB .BLUESJAZZ @GITHUB _POWER") } -func testCapitalCase_removeSpecialCharactersSpaces() { XCTAssertEqual( capitalCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false), "Mesqueeb Bluesjazz Github Power") } -func testCapitalCase___keepSpecialCharactersSpaces() { XCTAssertEqual( capitalCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ), "$Mesqueeb .Bluesjazz @Github _Power") } +@Test func spaceCase___removeSpecialCharactersSpaces() async throws { #expect( spaceCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false) == "mesqueeb BluesJazz github POWER") } +@Test func spaceCase_____keepSpecialCharactersSpaces() async throws { #expect( spaceCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ) == "$mesqueeb .BluesJazz @github _POWER") } +@Test func pathCase____removeSpecialCharactersSpaces() async throws { #expect( pathCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false) == "mesqueeb/BluesJazz/github/POWER") } +@Test func pathCase______keepSpecialCharactersSpaces() async throws { #expect( pathCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ) == "$mesqueeb/.BluesJazz/@github/_POWER") } +@Test func lowerCase___removeSpecialCharactersSpaces() async throws { #expect( lowerCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false) == "mesqueeb bluesjazz github power") } +@Test func lowerCase_____keepSpecialCharactersSpaces() async throws { #expect( lowerCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ) == "$mesqueeb .bluesjazz @github _power") } +@Test func upperCase___removeSpecialCharactersSpaces() async throws { #expect( upperCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false) == "MESQUEEB BLUESJAZZ GITHUB POWER") } +@Test func upperCase_____keepSpecialCharactersSpaces() async throws { #expect( upperCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ) == "$MESQUEEB .BLUESJAZZ @GITHUB _POWER") } +@Test func capitalCase_removeSpecialCharactersSpaces() async throws { #expect( capitalCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: false) == "Mesqueeb Bluesjazz Github Power") } +@Test func capitalCase___keepSpecialCharactersSpaces() async throws { #expect( capitalCase("$mesqueeb .BluesJazz @github _POWER", keepSpecialCharacters: true ) == "$Mesqueeb .Bluesjazz @Github _Power") } // Spaces & special characters in different spots -func testCamelCase____removeSpecialVariousCharactersSpaces() { XCTAssertEqual( camelCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false), "mesqueebBluesjazzGithubPower") } -func testCamelCase______keepSpecialVariousCharactersSpaces() { XCTAssertEqual( camelCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ), "$mesqueebBlues.jazzGit@hubPower") } -func testPascalCase___removeSpecialVariousCharactersSpaces() { XCTAssertEqual( pascalCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false), "MesqueebBluesjazzGithubPower") } -func testPascalCase_____keepSpecialVariousCharactersSpaces() { XCTAssertEqual( pascalCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ), "$MesqueebBlues.jazzGit@hubPower") } -func testKebabCase____removeSpecialVariousCharactersSpaces() { XCTAssertEqual( kebabCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false), "mesqueeb-bluesjazz-github-power") } -func testKebabCase______keepSpecialVariousCharactersSpaces() { XCTAssertEqual( kebabCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ), "$mesqueeb-blues.jazz-git@hub-power") } -func testSnakeCase____removeSpecialVariousCharactersSpaces() { XCTAssertEqual( snakeCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false), "mesqueeb_bluesjazz_github_power") } -func testSnakeCase______keepSpecialVariousCharactersSpaces() { XCTAssertEqual( snakeCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ), "$mesqueeb_blues.jazz_git@hub_power") } -func testConstantCase_removeSpecialVariousCharactersSpaces() { XCTAssertEqual( constantCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false), "MESQUEEB_BLUESJAZZ_GITHUB_POWER") } -func testConstantCase___keepSpecialVariousCharactersSpaces() { XCTAssertEqual( constantCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ), "$MESQUEEB_BLUES.JAZZ_GIT@HUB_POWER") } +@Test func camelCase____removeSpecialVariousCharactersSpaces() async throws { #expect( camelCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false) == "mesqueebBluesjazzGithubPower") } +@Test func camelCase______keepSpecialVariousCharactersSpaces() async throws { #expect( camelCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ) == "$mesqueebBlues.jazzGit@hubPower") } +@Test func pascalCase___removeSpecialVariousCharactersSpaces() async throws { #expect( pascalCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false) == "MesqueebBluesjazzGithubPower") } +@Test func pascalCase_____keepSpecialVariousCharactersSpaces() async throws { #expect( pascalCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ) == "$MesqueebBlues.jazzGit@hubPower") } +@Test func kebabCase____removeSpecialVariousCharactersSpaces() async throws { #expect( kebabCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false) == "mesqueeb-bluesjazz-github-power") } +@Test func kebabCase______keepSpecialVariousCharactersSpaces() async throws { #expect( kebabCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ) == "$mesqueeb-blues.jazz-git@hub-power") } +@Test func snakeCase____removeSpecialVariousCharactersSpaces() async throws { #expect( snakeCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false) == "mesqueeb_bluesjazz_github_power") } +@Test func snakeCase______keepSpecialVariousCharactersSpaces() async throws { #expect( snakeCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ) == "$mesqueeb_blues.jazz_git@hub_power") } +@Test func constantCase_removeSpecialVariousCharactersSpaces() async throws { #expect( constantCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false) == "MESQUEEB_BLUESJAZZ_GITHUB_POWER") } +@Test func constantCase___keepSpecialVariousCharactersSpaces() async throws { #expect( constantCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ) == "$MESQUEEB_BLUES.JAZZ_GIT@HUB_POWER") } -func testSpaceCase___removeSpecialVariousCharactersSpaces() { XCTAssertEqual( spaceCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false), "mesqueeb BluesJazz github POWER") } -func testSpaceCase_____keepSpecialVariousCharactersSpaces() { XCTAssertEqual( spaceCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ), "$mesqueeb Blues.Jazz git@hub POWER") } -func testPathCase____removeSpecialVariousCharactersSpaces() { XCTAssertEqual( pathCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false), "mesqueeb/BluesJazz/github/POWER") } -func testPathCase______keepSpecialVariousCharactersSpaces() { XCTAssertEqual( pathCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ), "$mesqueeb/Blues.Jazz/git@hub/POWER") } -func testLowerCase___removeSpecialVariousCharactersSpaces() { XCTAssertEqual( lowerCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false), "mesqueeb bluesjazz github power") } -func testLowerCase_____keepSpecialVariousCharactersSpaces() { XCTAssertEqual( lowerCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ), "$mesqueeb blues.jazz git@hub power") } -func testUpperCase___removeSpecialVariousCharactersSpaces() { XCTAssertEqual( upperCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false), "MESQUEEB BLUESJAZZ GITHUB POWER") } -func testUpperCase_____keepSpecialVariousCharactersSpaces() { XCTAssertEqual( upperCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ), "$MESQUEEB BLUES.JAZZ GIT@HUB POWER") } -func testCapitalCase_removeSpecialVariousCharactersSpaces() { XCTAssertEqual( capitalCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false), "Mesqueeb Bluesjazz Github Power") } -func testCapitalCase___keepSpecialVariousCharactersSpaces() { XCTAssertEqual( capitalCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ), "$Mesqueeb Blues.jazz Git@hub Power") } +@Test func spaceCase___removeSpecialVariousCharactersSpaces() async throws { #expect( spaceCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false) == "mesqueeb BluesJazz github POWER") } +@Test func spaceCase_____keepSpecialVariousCharactersSpaces() async throws { #expect( spaceCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ) == "$mesqueeb Blues.Jazz git@hub POWER") } +@Test func pathCase____removeSpecialVariousCharactersSpaces() async throws { #expect( pathCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false) == "mesqueeb/BluesJazz/github/POWER") } +@Test func pathCase______keepSpecialVariousCharactersSpaces() async throws { #expect( pathCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ) == "$mesqueeb/Blues.Jazz/git@hub/POWER") } +@Test func lowerCase___removeSpecialVariousCharactersSpaces() async throws { #expect( lowerCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false) == "mesqueeb bluesjazz github power") } +@Test func lowerCase_____keepSpecialVariousCharactersSpaces() async throws { #expect( lowerCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ) == "$mesqueeb blues.jazz git@hub power") } +@Test func upperCase___removeSpecialVariousCharactersSpaces() async throws { #expect( upperCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false) == "MESQUEEB BLUESJAZZ GITHUB POWER") } +@Test func upperCase_____keepSpecialVariousCharactersSpaces() async throws { #expect( upperCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ) == "$MESQUEEB BLUES.JAZZ GIT@HUB POWER") } +@Test func capitalCase_removeSpecialVariousCharactersSpaces() async throws { #expect( capitalCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: false) == "Mesqueeb Bluesjazz Github Power") } +@Test func capitalCase___keepSpecialVariousCharactersSpaces() async throws { #expect( capitalCase("$mesqueeb Blues.Jazz git@hub POWER", keepSpecialCharacters: true ) == "$Mesqueeb Blues.jazz Git@hub Power") } // DON'T strip special characters -- query without spaces -func testCamelCaseerdontStrip () { - XCTAssertEqual( - camelCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true), +@Test func camelCaseerdontStrip() async throws { + #expect( + camelCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true) == "$orderBy=name&skip=3&sort=true&name=james-p&email=sullivan@monsters.inc" ) } -func testPascalCaseerdontStrip () { - XCTAssertEqual( - pascalCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true), +@Test func pascalCaseerdontStrip() async throws { + #expect( + pascalCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true) == "$OrderBy=Name&Skip=3&Sort=True&Name=James-P&Email=Sullivan@Monsters.Inc" ) } -func testKebabCaseerdontStrip () { - XCTAssertEqual( - kebabCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true), +@Test func kebabCaseerdontStrip() async throws { + #expect( + kebabCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true) == "$order-by=name&skip=3&sort=true&name=james-p&email=sullivan@monsters.inc" ) } -func testSnakeCaseerdontStrip () { - XCTAssertEqual( - snakeCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true), +@Test func snakeCaseerdontStrip() async throws { + #expect( + snakeCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true) == "$order_by=name&skip=3&sort=true&name=james-p&email=sullivan@monsters.inc" ) } -func testConstantCaseerdontStrip () { - XCTAssertEqual( - constantCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true), +@Test func constantCaseerdontStrip() async throws { + #expect( + constantCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true) == "$ORDER_BY=NAME&SKIP=3&SORT=TRUE&NAME=JAMES-P&EMAIL=SULLIVAN@MONSTERS.INC" ) } -func testSpaceCaseerdontStrip () { - XCTAssertEqual( - spaceCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true), +@Test func spaceCaseerdontStrip() async throws { + #expect( + spaceCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true) == "$order By=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc" ) } -func testPathCaseerdontStrip () { - XCTAssertEqual( - pathCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true), +@Test func pathCaseerdontStrip() async throws { + #expect( + pathCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true) == "$order/By/=name/&skip/=3/&sort/=true/&name/=James/-P/&email/=sullivan/@monsters/.inc" ) } -func testLowerCaseerdontStrip () { - XCTAssertEqual( - lowerCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true), +@Test func lowerCaseerdontStrip() async throws { + #expect( + lowerCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true) == "$order by=name&skip=3&sort=true&name=james-p&email=sullivan@monsters.inc" ) } -func testUpperCaseerdontStrip () { - XCTAssertEqual( - upperCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true), +@Test func upperCaseerdontStrip() async throws { + #expect( + upperCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true) == "$ORDER BY=NAME&SKIP=3&SORT=TRUE&NAME=JAMES-P&EMAIL=SULLIVAN@MONSTERS.INC" ) } -func testCapitalCaseerdontStrip () { - XCTAssertEqual( - capitalCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true), +@Test func capitalCaseerdontStrip() async throws { + #expect( + capitalCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: true) == "$Order By=Name&Skip=3&Sort=True&Name=James-P&Email=Sullivan@Monsters.Inc" ) } // strip special characters -- query without spaces -func testCamelCaseerstrip () { - XCTAssertEqual( - camelCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false), +@Test func camelCaseerstrip() async throws { + #expect( + camelCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false) == "orderByNameSkip3SortTrueNameJamesPEmailSullivanMonstersInc" ) } -func testPascalCaseerstrip () { - XCTAssertEqual( - pascalCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false), +@Test func pascalCaseerstrip() async throws { + #expect( + pascalCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false) == "OrderByNameSkip3SortTrueNameJamesPEmailSullivanMonstersInc" ) } -func testKebabCaseerstrip () { - XCTAssertEqual( - kebabCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false), +@Test func kebabCaseerstrip() async throws { + #expect( + kebabCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false) == "order-by-name-skip-3-sort-true-name-james-p-email-sullivan-monsters-inc" ) } -func testSnakeCaseerstrip () { - XCTAssertEqual( - snakeCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false), +@Test func snakeCaseerstrip() async throws { + #expect( + snakeCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false) == "order_by_name_skip_3_sort_true_name_james_p_email_sullivan_monsters_inc" ) } -func testConstantCaseerstrip () { - XCTAssertEqual( - constantCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false), +@Test func constantCaseerstrip() async throws { + #expect( + constantCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false) == "ORDER_BY_NAME_SKIP_3_SORT_TRUE_NAME_JAMES_P_EMAIL_SULLIVAN_MONSTERS_INC" ) } -func testSpaceCaseerstrip () { - XCTAssertEqual( - spaceCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false), +@Test func spaceCaseerstrip() async throws { + #expect( + spaceCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false) == "order By name skip 3 sort true name James P email sullivan monsters inc" ) } -func testPathCaseerstrip () { - XCTAssertEqual( - pathCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false), +@Test func pathCaseerstrip() async throws { + #expect( + pathCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false) == "order/By/name/skip/3/sort/true/name/James/P/email/sullivan/monsters/inc" ) } -func testLowerCaseerstrip () { - XCTAssertEqual( - lowerCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false), +@Test func lowerCaseerstrip() async throws { + #expect( + lowerCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false) == "order by name skip 3 sort true name james p email sullivan monsters inc" ) } -func testUpperCaseerstrip () { - XCTAssertEqual( - upperCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false), +@Test func upperCaseerstrip() async throws { + #expect( + upperCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false) == "ORDER BY NAME SKIP 3 SORT TRUE NAME JAMES P EMAIL SULLIVAN MONSTERS INC" ) } -func testCapitalCaseerstrip () { - XCTAssertEqual( - capitalCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false), +@Test func capitalCaseerstrip() async throws { + #expect( + capitalCase("$orderBy=name&skip=3&sort=true&name=James-P&email=sullivan@monsters.inc", keepSpecialCharacters: false) == "Order By Name Skip 3 Sort True Name James P Email Sullivan Monsters Inc" ) } - -} diff --git a/Tests/ShortTests.swift b/Tests/ShortTests.swift index b5cf04e..debcc97 100644 --- a/Tests/ShortTests.swift +++ b/Tests/ShortTests.swift @@ -1,112 +1,110 @@ // swiftformat:disable all -import XCTest +import Testing @testable import CaseAnything -final class ShortTests: XCTestCase { - func testCamelCase____Short() { XCTAssertEqual( camelCase("$catDog"), "catDog") } - func testPascalCase___Short() { XCTAssertEqual( pascalCase("$catDog"), "CatDog") } - func testKebabCase____Short() { XCTAssertEqual( kebabCase("$catDog"), "cat-dog") } - func testSnakeCase____Short() { XCTAssertEqual( snakeCase("$catDog"), "cat_dog") } - func testConstantCase_Short() { XCTAssertEqual(constantCase("$catDog"), "CAT_DOG") } - func testAdaCase______Short() { XCTAssertEqual( adaCase("$catDog"), "Cat_Dog") } - func testCobolCase____Short() { XCTAssertEqual( cobolCase("$catDog"), "CAT-DOG") } - func testTrainCase____Short() { XCTAssertEqual( trainCase("$catDog"), "Cat-Dog") } - func testDotNotation__Short() { XCTAssertEqual( dotNotation("$catDog"), "cat.Dog") } - func testPathCase_____Short() { XCTAssertEqual( pathCase("$catDog"), "$cat/Dog") } - func testSpaceCase____Short() { XCTAssertEqual( spaceCase("$catDog"), "$cat Dog") } - func testCapitalCase__Short() { XCTAssertEqual( capitalCase("$catDog"), "$Cat Dog") } - func testUpperCase____Short() { XCTAssertEqual( upperCase("$catDog"), "$CAT DOG") } - func testLowerCase____Short() { XCTAssertEqual( lowerCase("$catDog"), "$cat dog") } - - func testCamelCase____Spaces() { XCTAssertEqual( camelCase("Cats? & Dogs!"), "catsDogs") } - func testPascalCase___Spaces() { XCTAssertEqual( pascalCase("Cats? & Dogs!"), "CatsDogs") } - func testKebabCase____Spaces() { XCTAssertEqual( kebabCase("Cats? & Dogs!"), "cats-dogs") } - func testSnakeCase____Spaces() { XCTAssertEqual( snakeCase("Cats? & Dogs!"), "cats_dogs") } - func testConstantCase_Spaces() { XCTAssertEqual(constantCase("Cats? & Dogs!"), "CATS_DOGS") } - func testAdaCase______Spaces() { XCTAssertEqual( adaCase("Cats? & Dogs!"), "Cats_Dogs") } - func testCobolCase____Spaces() { XCTAssertEqual( cobolCase("Cats? & Dogs!"), "CATS-DOGS") } - func testTrainCase____Spaces() { XCTAssertEqual( trainCase("Cats? & Dogs!"), "Cats-Dogs") } - func testDotNotation__Spaces() { XCTAssertEqual( dotNotation("Cats? & Dogs!"), "Cats.Dogs") } - func testPathCase_____Spaces() { XCTAssertEqual( pathCase("Cats? & Dogs!"), "Cats?/&/Dogs!") } - func testSpaceCase____Spaces() { XCTAssertEqual( spaceCase("Cats? & Dogs!"), "Cats? & Dogs!") } - func testCapitalCase__Spaces() { XCTAssertEqual( capitalCase("Cats? & Dogs!"), "Cats? & Dogs!") } - func testUpperCase____Spaces() { XCTAssertEqual( upperCase("Cats? & Dogs!"), "CATS? & DOGS!") } - func testLowerCase____Spaces() { XCTAssertEqual( lowerCase("Cats? & Dogs!"), "cats? & dogs!") } +@Test func camelCase____Short() async throws { #expect( camelCase("$catDog") == "catDog") } +@Test func pascalCase___Short() async throws { #expect( pascalCase("$catDog") == "CatDog") } +@Test func kebabCase____Short() async throws { #expect( kebabCase("$catDog") == "cat-dog") } +@Test func snakeCase____Short() async throws { #expect( snakeCase("$catDog") == "cat_dog") } +@Test func constantCase_Short() async throws { #expect(constantCase("$catDog") == "CAT_DOG") } +@Test func adaCase______Short() async throws { #expect( adaCase("$catDog") == "Cat_Dog") } +@Test func cobolCase____Short() async throws { #expect( cobolCase("$catDog") == "CAT-DOG") } +@Test func trainCase____Short() async throws { #expect( trainCase("$catDog") == "Cat-Dog") } +@Test func dotNotation__Short() async throws { #expect( dotNotation("$catDog") == "cat.Dog") } +@Test func pathCase_____Short() async throws { #expect( pathCase("$catDog") == "$cat/Dog") } +@Test func spaceCase____Short() async throws { #expect( spaceCase("$catDog") == "$cat Dog") } +@Test func capitalCase__Short() async throws { #expect( capitalCase("$catDog") == "$Cat Dog") } +@Test func upperCase____Short() async throws { #expect( upperCase("$catDog") == "$CAT DOG") } +@Test func lowerCase____Short() async throws { #expect( lowerCase("$catDog") == "$cat dog") } - func testCamelCase____Spaces2() { XCTAssertEqual( camelCase("I'm O.K.!"), "imOk") } - func testPascalCase___Spaces2() { XCTAssertEqual( pascalCase("I'm O.K.!"), "ImOk") } - func testKebabCase____Spaces2() { XCTAssertEqual( kebabCase("I'm O.K.!"), "im-ok") } - func testSnakeCase____Spaces2() { XCTAssertEqual( snakeCase("I'm O.K.!"), "im_ok") } - func testConstantCase_Spaces2() { XCTAssertEqual(constantCase("I'm O.K.!"), "IM_OK") } - func testAdaCase______Spaces2() { XCTAssertEqual( adaCase("I'm O.K.!"), "Im_Ok") } - func testCobolCase____Spaces2() { XCTAssertEqual( cobolCase("I'm O.K.!"), "IM-OK") } - func testTrainCase____Spaces2() { XCTAssertEqual( trainCase("I'm O.K.!"), "Im-Ok") } - func testDotNotation__Spaces2() { XCTAssertEqual( dotNotation("I'm O.K.!"), "Im.OK") } - func testPathCase_____Spaces2() { XCTAssertEqual( pathCase("I'm O.K.!"), "I\'m/O.K.!") } - func testSpaceCase____Spaces2() { XCTAssertEqual( spaceCase("I'm O.K.!"), "I\'m O.K.!") } - func testCapitalCase__Spaces2() { XCTAssertEqual( capitalCase("I'm O.K.!"), "I\'m O.k.!") } - func testUpperCase____Spaces2() { XCTAssertEqual( upperCase("I'm O.K.!"), "I\'M O.K.!") } - func testLowerCase____Spaces2() { XCTAssertEqual( lowerCase("I'm O.K.!"), "i\'m o.k.!") } +@Test func camelCase____Spaces() async throws { #expect( camelCase("Cats? & Dogs!") == "catsDogs") } +@Test func pascalCase___Spaces() async throws { #expect( pascalCase("Cats? & Dogs!") == "CatsDogs") } +@Test func kebabCase____Spaces() async throws { #expect( kebabCase("Cats? & Dogs!") == "cats-dogs") } +@Test func snakeCase____Spaces() async throws { #expect( snakeCase("Cats? & Dogs!") == "cats_dogs") } +@Test func constantCase_Spaces() async throws { #expect(constantCase("Cats? & Dogs!") == "CATS_DOGS") } +@Test func adaCase______Spaces() async throws { #expect( adaCase("Cats? & Dogs!") == "Cats_Dogs") } +@Test func cobolCase____Spaces() async throws { #expect( cobolCase("Cats? & Dogs!") == "CATS-DOGS") } +@Test func trainCase____Spaces() async throws { #expect( trainCase("Cats? & Dogs!") == "Cats-Dogs") } +@Test func dotNotation__Spaces() async throws { #expect( dotNotation("Cats? & Dogs!") == "Cats.Dogs") } +@Test func pathCase_____Spaces() async throws { #expect( pathCase("Cats? & Dogs!") == "Cats?/&/Dogs!") } +@Test func spaceCase____Spaces() async throws { #expect( spaceCase("Cats? & Dogs!") == "Cats? & Dogs!") } +@Test func capitalCase__Spaces() async throws { #expect( capitalCase("Cats? & Dogs!") == "Cats? & Dogs!") } +@Test func upperCase____Spaces() async throws { #expect( upperCase("Cats? & Dogs!") == "CATS? & DOGS!") } +@Test func lowerCase____Spaces() async throws { #expect( lowerCase("Cats? & Dogs!") == "cats? & dogs!") } - func testCamelCase____Keep() { XCTAssertEqual( camelCase("$cat-Dog!", keep: ["$"]), "$catDog") } - func testPascalCase___Keep() { XCTAssertEqual( pascalCase("$cat-Dog!", keep: ["$"]), "$CatDog") } - func testKebabCase____Keep() { XCTAssertEqual( kebabCase("$cat-Dog!", keep: ["$"]), "$cat-dog") } - func testSnakeCase____Keep() { XCTAssertEqual( snakeCase("$cat-Dog!", keep: ["$"]), "$cat_dog") } - func testConstantCase_Keep() { XCTAssertEqual(constantCase("$cat-Dog!", keep: ["$"]), "$CAT_DOG") } - func testPathCase_____Keep() { XCTAssertEqual( pathCase("$cat-Dog!", keep: ["$"]), "$cat/Dog") } - func testSpaceCase____Keep() { XCTAssertEqual( spaceCase("$cat-Dog!", keep: ["$"]), "$cat Dog") } - func testCapitalCase__Keep() { XCTAssertEqual( capitalCase("$cat-Dog!", keep: ["$"]), "$Cat Dog") } - func testUpperCase____Keep() { XCTAssertEqual( upperCase("$cat-Dog!", keep: ["$"]), "$CAT DOG") } - func testLowerCase____Keep() { XCTAssertEqual( lowerCase("$cat-Dog!", keep: ["$"]), "$cat dog") } - func testAdaCase______Keep() { XCTAssertEqual( adaCase("$cat-Dog!", keep: ["$"]), "$Cat_Dog") } - func testCobolCase____Keep() { XCTAssertEqual( cobolCase("$cat-Dog!", keep: ["$"]), "$CAT-DOG") } - func testTrainCase____Keep() { XCTAssertEqual( trainCase("$cat-Dog!", keep: ["$"]), "$Cat-Dog") } - func testDotNotation__Keep() { XCTAssertEqual( dotNotation("$cat-Dog!", keep: ["$"]), "$cat.Dog") } +@Test func camelCase____Spaces2() async throws { #expect( camelCase("I'm O.K.!") == "imOk") } +@Test func pascalCase___Spaces2() async throws { #expect( pascalCase("I'm O.K.!") == "ImOk") } +@Test func kebabCase____Spaces2() async throws { #expect( kebabCase("I'm O.K.!") == "im-ok") } +@Test func snakeCase____Spaces2() async throws { #expect( snakeCase("I'm O.K.!") == "im_ok") } +@Test func constantCase_Spaces2() async throws { #expect(constantCase("I'm O.K.!") == "IM_OK") } +@Test func adaCase______Spaces2() async throws { #expect( adaCase("I'm O.K.!") == "Im_Ok") } +@Test func cobolCase____Spaces2() async throws { #expect( cobolCase("I'm O.K.!") == "IM-OK") } +@Test func trainCase____Spaces2() async throws { #expect( trainCase("I'm O.K.!") == "Im-Ok") } +@Test func dotNotation__Spaces2() async throws { #expect( dotNotation("I'm O.K.!") == "Im.OK") } +@Test func pathCase_____Spaces2() async throws { #expect( pathCase("I'm O.K.!") == "I\'m/O.K.!") } +@Test func spaceCase____Spaces2() async throws { #expect( spaceCase("I'm O.K.!") == "I\'m O.K.!") } +@Test func capitalCase__Spaces2() async throws { #expect( capitalCase("I'm O.K.!") == "I\'m O.k.!") } +@Test func upperCase____Spaces2() async throws { #expect( upperCase("I'm O.K.!") == "I\'M O.K.!") } +@Test func lowerCase____Spaces2() async throws { #expect( lowerCase("I'm O.K.!") == "i\'m o.k.!") } - func testCamelCase____SpacesKeep() { XCTAssertEqual( camelCase("Cats? & Dogs!", keep: ["&", "!"]), "cats&Dogs!") } - func testPascalCase___SpacesKeep() { XCTAssertEqual( pascalCase("Cats? & Dogs!", keep: ["&", "!"]), "Cats&Dogs!") } - func testKebabCase____SpacesKeep() { XCTAssertEqual( kebabCase("Cats? & Dogs!", keep: ["&", "!"]), "cats-&-dogs!") } - func testSnakeCase____SpacesKeep() { XCTAssertEqual( snakeCase("Cats? & Dogs!", keep: ["&", "!"]), "cats_&_dogs!") } - func testConstantCase_SpacesKeep() { XCTAssertEqual(constantCase("Cats? & Dogs!", keep: ["&", "!"]), "CATS_&_DOGS!") } - func testPathCase_____SpacesKeep() { XCTAssertEqual( pathCase("Cats? & Dogs!", keep: ["&", "!"]), "Cats/&/Dogs!") } - func testSpaceCase____SpacesKeep() { XCTAssertEqual( spaceCase("Cats? & Dogs!", keep: ["&", "!"]), "Cats & Dogs!") } - func testCapitalCase__SpacesKeep() { XCTAssertEqual( capitalCase("Cats? & Dogs!", keep: ["&", "!"]), "Cats & Dogs!") } - func testUpperCase____SpacesKeep() { XCTAssertEqual( upperCase("Cats? & Dogs!", keep: ["&", "!"]), "CATS & DOGS!") } - func testLowerCase____SpacesKeep() { XCTAssertEqual( lowerCase("Cats? & Dogs!", keep: ["&", "!"]), "cats & dogs!") } - func testAdaCase______SpacesKeep() { XCTAssertEqual( adaCase("Cats? & Dogs!", keep: ["&", "!"]), "Cats_&_Dogs!") } - func testCobolCase____SpacesKeep() { XCTAssertEqual( cobolCase("Cats? & Dogs!", keep: ["&", "!"]), "CATS-&-DOGS!") } - func testTrainCase____SpacesKeep() { XCTAssertEqual( trainCase("Cats? & Dogs!", keep: ["&", "!"]), "Cats-&-Dogs!") } - func testDotNotation__SpacesKeep() { XCTAssertEqual( dotNotation("Cats? & Dogs!", keep: ["&", "!"]), "Cats.&.Dogs!") } +@Test func camelCase____Keep() async throws { #expect( camelCase("$cat-Dog!", keep: ["$"]) == "$catDog") } +@Test func pascalCase___Keep() async throws { #expect( pascalCase("$cat-Dog!", keep: ["$"]) == "$CatDog") } +@Test func kebabCase____Keep() async throws { #expect( kebabCase("$cat-Dog!", keep: ["$"]) == "$cat-dog") } +@Test func snakeCase____Keep() async throws { #expect( snakeCase("$cat-Dog!", keep: ["$"]) == "$cat_dog") } +@Test func constantCase_Keep() async throws { #expect(constantCase("$cat-Dog!", keep: ["$"]) == "$CAT_DOG") } +@Test func pathCase_____Keep() async throws { #expect( pathCase("$cat-Dog!", keep: ["$"]) == "$cat/Dog") } +@Test func spaceCase____Keep() async throws { #expect( spaceCase("$cat-Dog!", keep: ["$"]) == "$cat Dog") } +@Test func capitalCase__Keep() async throws { #expect( capitalCase("$cat-Dog!", keep: ["$"]) == "$Cat Dog") } +@Test func upperCase____Keep() async throws { #expect( upperCase("$cat-Dog!", keep: ["$"]) == "$CAT DOG") } +@Test func lowerCase____Keep() async throws { #expect( lowerCase("$cat-Dog!", keep: ["$"]) == "$cat dog") } +@Test func adaCase______Keep() async throws { #expect( adaCase("$cat-Dog!", keep: ["$"]) == "$Cat_Dog") } +@Test func cobolCase____Keep() async throws { #expect( cobolCase("$cat-Dog!", keep: ["$"]) == "$CAT-DOG") } +@Test func trainCase____Keep() async throws { #expect( trainCase("$cat-Dog!", keep: ["$"]) == "$Cat-Dog") } +@Test func dotNotation__Keep() async throws { #expect( dotNotation("$cat-Dog!", keep: ["$"]) == "$cat.Dog") } - func testCamelCase____SpacesKeep2() { XCTAssertEqual( camelCase("I'm O.K.!", keep: ["."]), "imO.k.") } - func testPascalCase___SpacesKeep2() { XCTAssertEqual( pascalCase("I'm O.K.!", keep: ["."]), "ImO.k.") } - func testKebabCase____SpacesKeep2() { XCTAssertEqual( kebabCase("I'm O.K.!", keep: ["."]), "im-o.k.") } - func testSnakeCase____SpacesKeep2() { XCTAssertEqual( snakeCase("I'm O.K.!", keep: ["."]), "im_o.k.") } - func testConstantCase_SpacesKeep2() { XCTAssertEqual(constantCase("I'm O.K.!", keep: ["."]), "IM_O.K.") } - func testPathCase_____SpacesKeep2() { XCTAssertEqual( pathCase("I'm O.K.!", keep: ["."]), "Im/O.K.") } - func testSpaceCase____SpacesKeep2() { XCTAssertEqual( spaceCase("I'm O.K.!", keep: ["."]), "Im O.K.") } - func testCapitalCase__SpacesKeep2() { XCTAssertEqual( capitalCase("I'm O.K.!", keep: ["."]), "Im O.k.") } - func testUpperCase____SpacesKeep2() { XCTAssertEqual( upperCase("I'm O.K.!", keep: ["."]), "IM O.K.") } - func testLowerCase____SpacesKeep2() { XCTAssertEqual( lowerCase("I'm O.K.!", keep: ["."]), "im o.k.") } - func testAdaCase______SpacesKeep2() { XCTAssertEqual( adaCase("I'm O.K.!", keep: ["."]), "Im_O.k.") } - func testCobolCase____SpacesKeep2() { XCTAssertEqual( cobolCase("I'm O.K.!", keep: ["."]), "IM-O.K.") } - func testTrainCase____SpacesKeep2() { XCTAssertEqual( trainCase("I'm O.K.!", keep: ["."]), "Im-O.k.") } - func testDotNotation__SpacesKeep2() { XCTAssertEqual( dotNotation("I'm O.K.!", keep: ["."]), "Im.O.K.") } +@Test func camelCase____SpacesKeep() async throws { #expect( camelCase("Cats? & Dogs!", keep: ["&", "!"]) == "cats&Dogs!") } +@Test func pascalCase___SpacesKeep() async throws { #expect( pascalCase("Cats? & Dogs!", keep: ["&", "!"]) == "Cats&Dogs!") } +@Test func kebabCase____SpacesKeep() async throws { #expect( kebabCase("Cats? & Dogs!", keep: ["&", "!"]) == "cats-&-dogs!") } +@Test func snakeCase____SpacesKeep() async throws { #expect( snakeCase("Cats? & Dogs!", keep: ["&", "!"]) == "cats_&_dogs!") } +@Test func constantCase_SpacesKeep() async throws { #expect(constantCase("Cats? & Dogs!", keep: ["&", "!"]) == "CATS_&_DOGS!") } +@Test func pathCase_____SpacesKeep() async throws { #expect( pathCase("Cats? & Dogs!", keep: ["&", "!"]) == "Cats/&/Dogs!") } +@Test func spaceCase____SpacesKeep() async throws { #expect( spaceCase("Cats? & Dogs!", keep: ["&", "!"]) == "Cats & Dogs!") } +@Test func capitalCase__SpacesKeep() async throws { #expect( capitalCase("Cats? & Dogs!", keep: ["&", "!"]) == "Cats & Dogs!") } +@Test func upperCase____SpacesKeep() async throws { #expect( upperCase("Cats? & Dogs!", keep: ["&", "!"]) == "CATS & DOGS!") } +@Test func lowerCase____SpacesKeep() async throws { #expect( lowerCase("Cats? & Dogs!", keep: ["&", "!"]) == "cats & dogs!") } +@Test func adaCase______SpacesKeep() async throws { #expect( adaCase("Cats? & Dogs!", keep: ["&", "!"]) == "Cats_&_Dogs!") } +@Test func cobolCase____SpacesKeep() async throws { #expect( cobolCase("Cats? & Dogs!", keep: ["&", "!"]) == "CATS-&-DOGS!") } +@Test func trainCase____SpacesKeep() async throws { #expect( trainCase("Cats? & Dogs!", keep: ["&", "!"]) == "Cats-&-Dogs!") } +@Test func dotNotation__SpacesKeep() async throws { #expect( dotNotation("Cats? & Dogs!", keep: ["&", "!"]) == "Cats.&.Dogs!") } - func testCamelCase____Keepspecialcharacters() { XCTAssertEqual( camelCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本catベルギーdogうちゅう") } - func testPascalCase___Keepspecialcharacters() { XCTAssertEqual( pascalCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本CatベルギーDogうちゅう") } - func testKebabCase____Keepspecialcharacters() { XCTAssertEqual( kebabCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本catベルギーdogうちゅう") } - func testSnakeCase____Keepspecialcharacters() { XCTAssertEqual( snakeCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本catベルギーdogうちゅう") } - func testConstantCase_Keepspecialcharacters() { XCTAssertEqual(constantCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本CATベルギーDOGうちゅう") } - func testAdaCase______Keepspecialcharacters() { XCTAssertEqual( adaCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本CatベルギーDogうちゅう") } - func testCobolCase____Keepspecialcharacters() { XCTAssertEqual( cobolCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本CATベルギーDOGうちゅう") } - func testTrainCase____Keepspecialcharacters() { XCTAssertEqual( trainCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本CatベルギーDogうちゅう") } - func testDotNotation__Keepspecialcharacters() { XCTAssertEqual( dotNotation("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本catベルギーdogうちゅう") } - func testPathCase_____Keepspecialcharacters() { XCTAssertEqual( pathCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本cat/ベルギーdog/うちゅう") } - func testSpaceCase____Keepspecialcharacters() { XCTAssertEqual( spaceCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本catベルギーdogうちゅう") } - func testCapitalCase__Keepspecialcharacters() { XCTAssertEqual( capitalCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本CatベルギーDogうちゅう") } - func testUpperCase____Keepspecialcharacters() { XCTAssertEqual( upperCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本CATベルギーDOGうちゅう") } - func testLowerCase____Keepspecialcharacters() { XCTAssertEqual( lowerCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true), "日本catベルギーdogうちゅう") } -} +@Test func camelCase____SpacesKeep2() async throws { #expect( camelCase("I'm O.K.!", keep: ["."]) == "imO.k.") } +@Test func pascalCase___SpacesKeep2() async throws { #expect( pascalCase("I'm O.K.!", keep: ["."]) == "ImO.k.") } +@Test func kebabCase____SpacesKeep2() async throws { #expect( kebabCase("I'm O.K.!", keep: ["."]) == "im-o.k.") } +@Test func snakeCase____SpacesKeep2() async throws { #expect( snakeCase("I'm O.K.!", keep: ["."]) == "im_o.k.") } +@Test func constantCase_SpacesKeep2() async throws { #expect(constantCase("I'm O.K.!", keep: ["."]) == "IM_O.K.") } +@Test func pathCase_____SpacesKeep2() async throws { #expect( pathCase("I'm O.K.!", keep: ["."]) == "Im/O.K.") } +@Test func spaceCase____SpacesKeep2() async throws { #expect( spaceCase("I'm O.K.!", keep: ["."]) == "Im O.K.") } +@Test func capitalCase__SpacesKeep2() async throws { #expect( capitalCase("I'm O.K.!", keep: ["."]) == "Im O.k.") } +@Test func upperCase____SpacesKeep2() async throws { #expect( upperCase("I'm O.K.!", keep: ["."]) == "IM O.K.") } +@Test func lowerCase____SpacesKeep2() async throws { #expect( lowerCase("I'm O.K.!", keep: ["."]) == "im o.k.") } +@Test func adaCase______SpacesKeep2() async throws { #expect( adaCase("I'm O.K.!", keep: ["."]) == "Im_O.k.") } +@Test func cobolCase____SpacesKeep2() async throws { #expect( cobolCase("I'm O.K.!", keep: ["."]) == "IM-O.K.") } +@Test func trainCase____SpacesKeep2() async throws { #expect( trainCase("I'm O.K.!", keep: ["."]) == "Im-O.k.") } +@Test func dotNotation__SpacesKeep2() async throws { #expect( dotNotation("I'm O.K.!", keep: ["."]) == "Im.O.K.") } + +@Test func camelCase____Keepspecialcharacters() async throws { #expect( camelCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本catベルギーdogうちゅう") } +@Test func pascalCase___Keepspecialcharacters() async throws { #expect( pascalCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本CatベルギーDogうちゅう") } +@Test func kebabCase____Keepspecialcharacters() async throws { #expect( kebabCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本catベルギーdogうちゅう") } +@Test func snakeCase____Keepspecialcharacters() async throws { #expect( snakeCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本catベルギーdogうちゅう") } +@Test func constantCase_Keepspecialcharacters() async throws { #expect(constantCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本CATベルギーDOGうちゅう") } +@Test func adaCase______Keepspecialcharacters() async throws { #expect( adaCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本CatベルギーDogうちゅう") } +@Test func cobolCase____Keepspecialcharacters() async throws { #expect( cobolCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本CATベルギーDOGうちゅう") } +@Test func trainCase____Keepspecialcharacters() async throws { #expect( trainCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本CatベルギーDogうちゅう") } +@Test func dotNotation__Keepspecialcharacters() async throws { #expect( dotNotation("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本catベルギーdogうちゅう") } +@Test func pathCase_____Keepspecialcharacters() async throws { #expect( pathCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本cat/ベルギーdog/うちゅう") } +@Test func spaceCase____Keepspecialcharacters() async throws { #expect( spaceCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本catベルギーdogうちゅう") } +@Test func capitalCase__Keepspecialcharacters() async throws { #expect( capitalCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本CatベルギーDogうちゅう") } +@Test func upperCase____Keepspecialcharacters() async throws { #expect( upperCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本CATベルギーDOGうちゅう") } +@Test func lowerCase____Keepspecialcharacters() async throws { #expect( lowerCase("日本catベルギーdogうちゅう", keepSpecialCharacters: true) == "日本catベルギーdogうちゅう") } diff --git a/Tests/UtilTests.swift b/Tests/UtilTests.swift index 1cb85f7..ddc069c 100644 --- a/Tests/UtilTests.swift +++ b/Tests/UtilTests.swift @@ -1,67 +1,65 @@ @testable import CaseAnything -import XCTest +import Testing -final class UtilTests: XCTestCase { - func testSplitandprefixKeepspecialcharactersFalse() { - XCTAssertEqual( - splitAndPrefix("$mesqueeb.mesqueebmesqueeb..mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), - ["mesqueeb", "mesqueebmesqueeb", "mesqueeb", "Blues", "Jazz", "github", "com"] - ) - } +@Test func splitandprefixKeepspecialcharactersFalse() async throws { + #expect( + splitAndPrefix("$mesqueeb.mesqueebmesqueeb..mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == + ["mesqueeb", "mesqueebmesqueeb", "mesqueeb", "Blues", "Jazz", "github", "com"] + ) +} - func testSplitandprefixKeepspecialcharactersTrue() { - XCTAssertEqual( - splitAndPrefix("$mesqueeb.mesqueebmesqueeb..mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true), - ["$mesqueeb", ".mesqueebmesqueeb", "..mesqueeb", ".Blues", "Jazz", "@github", ".com"] - ) - } +@Test func splitandprefixKeepspecialcharactersTrue() async throws { + #expect( + splitAndPrefix("$mesqueeb.mesqueebmesqueeb..mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true) == + ["$mesqueeb", ".mesqueebmesqueeb", "..mesqueeb", ".Blues", "Jazz", "@github", ".com"] + ) +} - func testSplitandprefixKeepspecialcharactersFalsePrefix() { - XCTAssertEqual( - splitAndPrefix("$mesqueeb.mesqueebmesqueeb.mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false, prefix: "-"), - ["mesqueeb", "-mesqueebmesqueeb", "-mesqueeb", "-Blues", "-Jazz", "-github", "-com"] - ) - } +@Test func splitandprefixKeepspecialcharactersFalsePrefix() async throws { + #expect( + splitAndPrefix("$mesqueeb.mesqueebmesqueeb.mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false, prefix: "-") == + ["mesqueeb", "-mesqueebmesqueeb", "-mesqueeb", "-Blues", "-Jazz", "-github", "-com"] + ) +} - func testSplitandprefixshortKeepspecialcharactersFalsePrefix() { - XCTAssertEqual( - splitAndPrefix("mesqueebMESQUEEB", keepSpecialCharacters: true, prefix: "-"), - ["mesqueeb", "-MESQUEEB"] - ) - } +@Test func splitandprefixshortKeepspecialcharactersFalsePrefix() async throws { + #expect( + splitAndPrefix("mesqueebMESQUEEB", keepSpecialCharacters: true, prefix: "-") == + ["mesqueeb", "-MESQUEEB"] + ) +} - func testSplitandprefixKeepspecialcharactersTruePrefix() { - XCTAssertEqual( - splitAndPrefix("$mesqueeb.mesqueebmesqueeb.mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true, prefix: "-"), - ["$mesqueeb", ".mesqueebmesqueeb", ".mesqueeb", ".Blues", "-Jazz", "@github", ".com"] - ) - } +@Test func splitandprefixKeepspecialcharactersTruePrefix() async throws { + #expect( + splitAndPrefix("$mesqueeb.mesqueebmesqueeb.mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true, prefix: "-") == + ["$mesqueeb", ".mesqueebmesqueeb", ".mesqueeb", ".Blues", "-Jazz", "@github", ".com"] + ) +} - func testSplitandprefixMultipleSpecialCharsKeepspecialcharactersTruePrefix() { - XCTAssertEqual( - splitAndPrefix("$$mesqueeb-/_mesqueebmesqueeb...mesqueeb.BluesJazz@_@github.-com", keepSpecialCharacters: true, prefix: "-"), - ["$$mesqueeb", "-/_mesqueebmesqueeb", "...mesqueeb", ".Blues", "-Jazz", "@_@github", ".-com"] - ) - } +@Test func splitandprefixMultipleSpecialCharsKeepspecialcharactersTruePrefix() async throws { + #expect( + splitAndPrefix("$$mesqueeb-/_mesqueebmesqueeb...mesqueeb.BluesJazz@_@github.-com", keepSpecialCharacters: true, prefix: "-") == + ["$$mesqueeb", "-/_mesqueebmesqueeb", "...mesqueeb", ".Blues", "-Jazz", "@_@github", ".-com"] + ) +} - func testSplitandprefixSlice1KeepspecialcharactersTrue() { - XCTAssertEqual( - splitAndPrefix("mesqueeb.mesqueebmesqueeb.mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true), - ["mesqueeb", ".mesqueebmesqueeb", ".mesqueeb", ".Blues", "Jazz", "@github", ".com"] - ) - } +@Test func splitandprefixSlice1KeepspecialcharactersTrue() async throws { + #expect( + splitAndPrefix("mesqueeb.mesqueebmesqueeb.mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true) == + ["mesqueeb", ".mesqueebmesqueeb", ".mesqueeb", ".Blues", "Jazz", "@github", ".com"] + ) +} - func testSplitandprefixSentenceKeepspecialcharactersFalse() { - XCTAssertEqual( - splitAndPrefix("$mesqueeb.mesqueeb mesqueeb.mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false), - ["mesqueebmesqueeb", "mesqueebmesqueebBluesJazzgithubcom"] - ) - } +@Test func splitandprefixSentenceKeepspecialcharactersFalse() async throws { + #expect( + splitAndPrefix("$mesqueeb.mesqueeb mesqueeb.mesqueeb.BluesJazz@github.com", keepSpecialCharacters: false) == + ["mesqueebmesqueeb", "mesqueebmesqueebBluesJazzgithubcom"] + ) +} - func testSplitandprefixSentenceKeepspecialcharactersTrue() { - XCTAssertEqual( - splitAndPrefix("$mesqueeb.mesqueeb mesqueeb.mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true), - ["$mesqueeb.mesqueeb", "mesqueeb.mesqueeb.BluesJazz@github.com"] - ) - } +@Test func splitandprefixSentenceKeepspecialcharactersTrue() async throws { + #expect( + splitAndPrefix("$mesqueeb.mesqueeb mesqueeb.mesqueeb.BluesJazz@github.com", keepSpecialCharacters: true) == + ["$mesqueeb.mesqueeb", "mesqueeb.mesqueeb.BluesJazz@github.com"] + ) } From dbf183430ecec2148dc4d3cf408bcf12261f3782 Mon Sep 17 00:00:00 2001 From: mesqueeb Date: Wed, 10 Jul 2024 16:07:44 +0900 Subject: [PATCH 2/2] feat: enable swift testing --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 306c6c1..97aa28e 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.3", "type": "module", "scripts": { - "test": "swift test", + "test": "swift test --enable-swift-testing", "bump": "np --no-cleanup --no-publish", "postversion": "replace-regex --from=\"\\d+\\.\\d+\\.\\d+\" --to=\"$npm_package_version\" README.md && git add README.md && git commit -m \"chore: bump\"" },