[bug] Fix crash on generating enum sql builder files when enum contains numeric values.

This commit is contained in:
go-jet 2020-02-15 11:20:51 +01:00
parent f154701e60
commit 63c1fd6430
5 changed files with 42 additions and 5 deletions

View file

@ -25,6 +25,11 @@ func TestToGoIdentifier(t *testing.T) {
assert.Equal(t, ToGoIdentifier("My-Table"), "MyTable")
}
func TestToGoEnumValueIdentifier(t *testing.T) {
assert.Equal(t, ToGoEnumValueIdentifier("enum_name", "enum_value"), "EnumValue")
assert.Equal(t, ToGoEnumValueIdentifier("NumEnum", "100"), "NumEnum100")
}
func TestErrorCatchErr(t *testing.T) {
var err error