Skip to content

Commit cda4a4c

Browse files
committed
Additional test cases
1 parent 3da75b8 commit cda4a4c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tests/OpenAPIGeneratorCoreTests/Extensions/Test_SwiftSafeNames.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ final class Test_SwiftSafeNames: Test_Core {
3535

3636
// All uppercase
3737
("HELLO_WORLD", "HELLO_WORLD", "HelloWorld", "helloWorld"),
38+
("HELLO", "HELLO", "Hello", "hello"),
3839

3940
// Acronyms
4041
("HTTPProxy", "HTTPProxy", "HTTPProxy", "httpProxy"),
@@ -89,10 +90,11 @@ final class Test_SwiftSafeNames: Test_Core {
8990
("invalidNam?", "invalidNam_quest_", "invalidNam_quest_", "invalidNam_quest_"),
9091

9192
// Preserve leading underscores
92-
("__user", "__user", "__User", "__user"),
93+
("__user_name", "__user_name", "__UserName", "__userName"),
9394

9495
// Preserve only leading underscores
9596
("user__name", "user__name", "UserName", "userName"),
97+
9698
// Invalid underscore case
9799
("_", "_underscore_", "_underscore_", "_underscore_"),
98100

@@ -107,6 +109,7 @@ final class Test_SwiftSafeNames: Test_Core {
107109

108110
// Non Latin Characters combined with a RTL language
109111
("$مرحبا", "_dollar_مرحبا", "_dollar_مرحبا", "_dollar_مرحبا"),
112+
110113
// Emoji
111114
("heart❤️emoji", "heart_x2764_️emoji", "heart_x2764_️emoji", "heart_x2764_️emoji"),
112115

0 commit comments

Comments
 (0)