github.com/webx-top/com@v1.2.12/rand_test.go (about)

     1  package com
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  )
     7  
     8  func TestRandStr(t *testing.T) {
     9  	for i := 0; i < 5; i++ {
    10  		fmt.Println(`RandomString:`, RandomString(32))
    11  	}
    12  	for i := 0; i < 5; i++ {
    13  		fmt.Println(`RandStr:`, RandStr(32))
    14  	}
    15  	for i := 0; i < 5; i++ {
    16  		fmt.Println(`RandomASCII:`, RandomASCII(32))
    17  	}
    18  	for i := 0; i < 5; i++ {
    19  		fmt.Println(`RandomAlphabetic:`, RandomAlphabetic(32))
    20  	}
    21  	for i := 0; i < 5; i++ {
    22  		fmt.Println(`RandomAlphanumeric:`, RandomAlphanumeric(32))
    23  	}
    24  	for i := 0; i < 5; i++ {
    25  		fmt.Println(`RandomNumeric:`, RandomNumeric(32))
    26  	}
    27  }