fix(goctl): test field (#3114)

This commit is contained in:
LiKe
2023-04-15 21:46:37 +08:00
committed by GitHub
parent ede19a89ec
commit 8fa0bd1f1c

View File

@@ -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,
}, },
}...) }...)