github.com/whatap/golib@v0.0.22/util/hexa32/Hexa32_test.go (about)

     1  package hexa32
     2  
     3  import (
     4  	// "fmt"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func TestToSting32(t *testing.T) {
    11  	s := int64(-743752992412427445)
    12  	v := ToString32(s)
    13  	s1 := "zkkincvom0p5l"
    14  	assert.Equal(t, s1, v)
    15  
    16  }
    17  
    18  func TestToLong32(t *testing.T) {
    19  	s := "zkkincvom0p5l"
    20  	s1 := int64(-743752992412427445)
    21  	v := ToLong32(s)
    22  	assert.Equal(t, s1, v)
    23  }