17 lines
532 B
Nim
17 lines
532 B
Nim
# To run these tests, simply execute `nimble test`.
|
|
import unittest
|
|
import snake_case
|
|
|
|
test "toCamelCase":
|
|
check "TO_SNAKE_CASE".toCamelCase() == "toSnakeCase"
|
|
check "HTTP_SERVER_NAME".toCamelCase() == "httpServerName"
|
|
check "PORT_NUM".toCamelCase() == "portNum"
|
|
check "FIRST_NAME_ONLY".toCamelCase() == "firstNameOnly"
|
|
check "ROSTR_TOKEN".toCamelCase() == "rostrToken"
|
|
|
|
test "all lowercase":
|
|
check "thisisatest".toCamelCase() == "thisisatest"
|
|
|
|
test "all uppercase":
|
|
check "THISISATEST".toCamelCase() == "thisisatest"
|