mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Fix stdx::to_snake_case
This commit is contained in:
parent
1161fa45af
commit
a4f08c117f
2 changed files with 40 additions and 14 deletions
|
@ -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"]]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue