go.undefinedlabs.com/scopeagent@v0.4.2/tracer/util_test.go (about)

     1  package tracer
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/google/uuid"
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func TestUUIDStringConverter(t *testing.T) {
    11  	for i := 0; i < 10000; i++ {
    12  		id := uuid.New()
    13  		val := UUIDToString(id)
    14  		idRes, err := StringToUUID(val)
    15  		if err != nil {
    16  			t.Fatal(err)
    17  		}
    18  		assert.Equal(t, id.String(), idRes.String())
    19  	}
    20  }