mecha10-cli 0.1.47

Mecha10 CLI tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Tests for mecha10_cli::utils::string_case

use mecha10_cli::utils::string_case::*;

#[test]
fn test_to_pascal_case() {
    assert_eq!(to_pascal_case("hello_world"), "HelloWorld");
    assert_eq!(to_pascal_case("foo_bar_baz"), "FooBarBaz");
    assert_eq!(to_pascal_case("test"), "Test");
}

#[test]
fn test_to_snake_case() {
    assert_eq!(to_snake_case("HelloWorld"), "hello_world");
    assert_eq!(to_snake_case("FooBarBaz"), "foo_bar_baz");
    assert_eq!(to_snake_case("Test"), "test");
}