123456789101112131415161718192021222324252627 |
- package generator
- import "testing"
- func TestUnderscore(t *testing.T) {
- type args struct {
- s string
- }
- tests := []struct {
- name string
- args args
- want string
- }{
- {
- name: "remoteIP",
- args: args{s: "remoteIP"},
- want: "remote_ip",
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- if got := underscore(tt.args.s); got != tt.want {
- t.Errorf("underscore() = %v, want %v", got, tt.want)
- }
- })
- }
- }
|