fix(goctl): test field (#3114)

master
LiKe 2 years ago committed by GitHub
parent ede19a89ec
commit 8fa0bd1f1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,13 +16,13 @@ func TestExecutor_Run(t *testing.T) {
}, },
{ {
Name: "snake_case", Name: "snake_case",
input: "A_B_C", Input: "A_B_C",
want: "a_b_c", Want: "a_b_c",
}, },
{ {
Name: "camel_case", Name: "camel_case",
input: "AaBbCc", Input: "AaBbCc",
want: "aabbcc", Want: "aabbcc",
}, },
}...) }...)
executor.Run(t, func(s string) string { executor.Run(t, func(s string) string {
@ -39,17 +39,17 @@ func TestExecutor_RunE(t *testing.T) {
}, },
{ {
Name: "snake_case", Name: "snake_case",
input: "A_B_C", Input: "A_B_C",
want: "a_b_c", Want: "a_b_c",
}, },
{ {
Name: "camel_case", Name: "camel_case",
input: "AaBbCc", Input: "AaBbCc",
want: "aabbcc", Want: "aabbcc",
}, },
{ {
Name: "invalid_input", Name: "invalid_input",
input: "😄", Input: "😄",
E: dummyError, E: dummyError,
}, },
}...) }...)
@ -75,17 +75,17 @@ func TestWithComparison(t *testing.T) {
}, },
{ {
Name: "snake_case", Name: "snake_case",
input: "A_B_C", Input: "A_B_C",
want: "a_b_c", Want: "a_b_c",
}, },
{ {
Name: "camel_case", Name: "camel_case",
input: "AaBbCc", Input: "AaBbCc",
want: "aabbcc", Want: "aabbcc",
}, },
{ {
Name: "invalid_input", Name: "invalid_input",
input: "😄", Input: "😄",
E: dummyError, E: dummyError,
}, },
}...) }...)

Loading…
Cancel
Save