FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
stackrox/central/graphql/generator/codegen/case_test.go at master · stackrox/stackrox · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
stackrox
/
stackrox
Public
Notifications
You must be signed in to change notification settings
Fork
191
Star
1.3k
Code
Issues
54
Pull requests
596
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
stackrox
/
central
/
graphql
/
generator
/
codegen
/
case_test.go
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (22 loc) · 559 Bytes
Breadcrumbs
stackrox
/
central
/
graphql
/
generator
/
codegen
/
case_test.go
Copy path
File metadata and controls
25 lines (22 loc) · 559 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package
codegen
import
(
"testing"
"github.com/stretchr/testify/assert"
)
func
Test_camelCase
(
t
*
testing.
T
) {
tests
:=
map
[
string
]
string
{
""
:
""
,
"_my_field_name_2"
:
"XMyFieldName_2"
,
"my_field_name_2"
:
"MyFieldName_2"
,
"My_field_name_2"
:
"MyFieldName_2"
,
"My_Field_Name_2"
:
"My_Field_Name_2"
,
"MyFieldName2"
:
"MyFieldName2"
,
"__field_name__"
:
"XFieldName__"
,
}
for
given
,
expected
:=
range
tests
{
t
.
Run
(
given
,
func
(
t
*
testing.
T
) {
actual
:=
camelCase
(
given
)
assert
.
Equal
(
t
,
expected
,
actual
)
})
}
}
Back
|
FazBrowse Home
|
New Git URL