Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/diagnostics/decl_check/case_conv.rs')
| -rw-r--r-- | crates/hir_ty/src/diagnostics/decl_check/case_conv.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/hir_ty/src/diagnostics/decl_check/case_conv.rs b/crates/hir_ty/src/diagnostics/decl_check/case_conv.rs index 7c477d4945..88d607194f 100644 --- a/crates/hir_ty/src/diagnostics/decl_check/case_conv.rs +++ b/crates/hir_ty/src/diagnostics/decl_check/case_conv.rs @@ -161,6 +161,7 @@ mod tests { check(to_lower_snake_case, "lowerCamelCase", expect![["lower_camel_case"]]); check(to_lower_snake_case, "a", expect![[""]]); check(to_lower_snake_case, "abc", expect![[""]]); + check(to_lower_snake_case, "foo__bar", expect![["foo_bar"]]); } #[test] @@ -192,5 +193,7 @@ mod tests { check(to_upper_snake_case, "A", expect![[""]]); check(to_upper_snake_case, "ABC", expect![[""]]); check(to_upper_snake_case, "X86_64", expect![[""]]); + check(to_upper_snake_case, "FOO_BAr", expect![["FOO_BAR"]]); + check(to_upper_snake_case, "FOO__BAR", expect![["FOO_BAR"]]); } } |