github.com/sandwich-go/boost@v1.3.29/xstrings/snake_case_test.go (about) 1 package xstrings 2 3 import ( 4 . "github.com/smartystreets/goconvey/convey" 5 "testing" 6 ) 7 8 func TestSnakeCase(t *testing.T) { 9 Convey("snake case", t, func() { 10 So(SnakeCase("XCamel_Case_"), ShouldEqual, "x_camel__case_") 11 So(SnakeCase("CamelCase"), ShouldEqual, "camel_case") 12 }) 13 }