Browse Source

ran gofmt -s -w *.go

tags/v0.1.0
Ma_124 5 years ago
parent
commit
d73be125f8
2 changed files with 52 additions and 52 deletions
  1. +13
    -13
      camel_test.go
  2. +39
    -39
      snake_test.go

+ 13
- 13
camel_test.go View File

@@ -30,15 +30,15 @@ import (

func TestToCamel(t *testing.T) {
cases := [][]string{
[]string{"test_case", "TestCase"},
[]string{"test", "Test"},
[]string{"TestCase", "TestCase"},
[]string{" test case ", "TestCase"},
[]string{"", ""},
[]string{"many_many_words", "ManyManyWords"},
[]string{"AnyKind of_string", "AnyKindOfString"},
[]string{"odd-fix", "OddFix"},
[]string{"numbers2And55with000", "Numbers2And55With000"},
{"test_case", "TestCase"},
{"test", "Test"},
{"TestCase", "TestCase"},
{" test case ", "TestCase"},
{"", ""},
{"many_many_words", "ManyManyWords"},
{"AnyKind of_string", "AnyKindOfString"},
{"odd-fix", "OddFix"},
{"numbers2And55with000", "Numbers2And55With000"},
}
for _, i := range cases {
in := i[0]
@@ -52,10 +52,10 @@ func TestToCamel(t *testing.T) {

func TestToLowerCamel(t *testing.T) {
cases := [][]string{
[]string{"foo-bar", "fooBar"},
[]string{"TestCase", "testCase"},
[]string{"", ""},
[]string{"AnyKind of_string", "anyKindOfString"},
{"foo-bar", "fooBar"},
{"TestCase", "testCase"},
{"", ""},
{"AnyKind of_string", "anyKindOfString"},
}
for _, i := range cases {
in := i[0]


+ 39
- 39
snake_test.go View File

@@ -31,23 +31,23 @@ import (

func TestToSnake(t *testing.T) {
cases := [][]string{
[]string{"testCase", "test_case"},
[]string{"TestCase", "test_case"},
[]string{"Test Case", "test_case"},
[]string{" Test Case", "test_case"},
[]string{"Test Case ", "test_case"},
[]string{" Test Case ", "test_case"},
[]string{"test", "test"},
[]string{"test_case", "test_case"},
[]string{"Test", "test"},
[]string{"", ""},
[]string{"ManyManyWords", "many_many_words"},
[]string{"manyManyWords", "many_many_words"},
[]string{"AnyKind of_string", "any_kind_of_string"},
[]string{"numbers2and55with000", "numbers_2_and_55_with_000"},
[]string{"JSONData", "json_data"},
[]string{"userID", "user_id"},
[]string{"AAAbbb", "aa_abbb"},
{"testCase", "test_case"},
{"TestCase", "test_case"},
{"Test Case", "test_case"},
{" Test Case", "test_case"},
{"Test Case ", "test_case"},
{" Test Case ", "test_case"},
{"test", "test"},
{"test_case", "test_case"},
{"Test", "test"},
{"", ""},
{"ManyManyWords", "many_many_words"},
{"manyManyWords", "many_many_words"},
{"AnyKind of_string", "any_kind_of_string"},
{"numbers2and55with000", "numbers_2_and_55_with_000"},
{"JSONData", "json_data"},
{"userID", "user_id"},
{"AAAbbb", "aa_abbb"},
}
for _, i := range cases {
in := i[0]
@@ -61,24 +61,24 @@ func TestToSnake(t *testing.T) {

func TestToDelimited(t *testing.T) {
cases := [][]string{
[]string{"testCase", "test@case"},
[]string{"TestCase", "test@case"},
[]string{"Test Case", "test@case"},
[]string{" Test Case", "test@case"},
[]string{"Test Case ", "test@case"},
[]string{" Test Case ", "test@case"},
[]string{"test", "test"},
[]string{"test_case", "test@case"},
[]string{"Test", "test"},
[]string{"", ""},
[]string{"ManyManyWords", "many@many@words"},
[]string{"manyManyWords", "many@many@words"},
[]string{"AnyKind of_string", "any@kind@of@string"},
[]string{"numbers2and55with000", "numbers@2@and@55@with@000"},
[]string{"JSONData", "json@data"},
[]string{"userID", "user@id"},
[]string{"AAAbbb", "aa@abbb"},
[]string{"test-case", "test@case"},
{"testCase", "test@case"},
{"TestCase", "test@case"},
{"Test Case", "test@case"},
{" Test Case", "test@case"},
{"Test Case ", "test@case"},
{" Test Case ", "test@case"},
{"test", "test"},
{"test_case", "test@case"},
{"Test", "test"},
{"", ""},
{"ManyManyWords", "many@many@words"},
{"manyManyWords", "many@many@words"},
{"AnyKind of_string", "any@kind@of@string"},
{"numbers2and55with000", "numbers@2@and@55@with@000"},
{"JSONData", "json@data"},
{"userID", "user@id"},
{"AAAbbb", "aa@abbb"},
{"test-case", "test@case"},
}
for _, i := range cases {
in := i[0]
@@ -92,7 +92,7 @@ func TestToDelimited(t *testing.T) {

func TestToScreamingSnake(t *testing.T) {
cases := [][]string{
[]string{"testCase", "TEST_CASE"},
{"testCase", "TEST_CASE"},
}
for _, i := range cases {
in := i[0]
@@ -106,7 +106,7 @@ func TestToScreamingSnake(t *testing.T) {

func TestToKebab(t *testing.T) {
cases := [][]string{
[]string{"testCase", "test-case"},
{"testCase", "test-case"},
}
for _, i := range cases {
in := i[0]
@@ -120,7 +120,7 @@ func TestToKebab(t *testing.T) {

func TestToScreamingKebab(t *testing.T) {
cases := [][]string{
[]string{"testCase", "TEST-CASE"},
{"testCase", "TEST-CASE"},
}
for _, i := range cases {
in := i[0]
@@ -134,7 +134,7 @@ func TestToScreamingKebab(t *testing.T) {

func TestToScreamingDelimited(t *testing.T) {
cases := [][]string{
[]string{"testCase", "TEST.CASE"},
{"testCase", "TEST.CASE"},
}
for _, i := range cases {
in := i[0]


Loading…
Cancel
Save