github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-grpc-middleware/logging/logrus/options_test.go (about)

     1  package grpc_logrus
     2  
     3  import (
     4  	"github.com/stretchr/testify/assert"
     5  	"testing"
     6  	"time"
     7  )
     8  
     9  func TestDurationToTimeMillisField(t *testing.T) {
    10  	_, val := DurationToTimeMillisField(time.Microsecond * 100)
    11  	assert.Equal(t, val.(float32), float32(0.1), "sub millisecond values should be correct")
    12  }