本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 line
296B

  1. package generate
  2. import (
  3. "os"
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. )
  7. func TestMain(m *testing.M) {
  8. retVal := m.Run()
  9. os.Exit(retVal)
  10. }
  11. func TestGetRandomString(t *testing.T) {
  12. randomString, err := GetRandomString(4)
  13. assert.NoError(t, err)
  14. assert.Len(t, randomString, 4)
  15. }
上海开阖软件有限公司 沪ICP备12045867号-1