github.com/blueinnovationsgroup/can-go@v0.0.0-20230518195432-d0567cda0028/pkg/socketcan/canrawaddr_test.go (about)

     1  package socketcan
     2  
     3  import (
     4  	"testing"
     5  
     6  	"gotest.tools/v3/assert"
     7  )
     8  
     9  func TestCanRawAddr_Network(t *testing.T) {
    10  	addr := &canRawAddr{device: "can0"}
    11  	assert.Equal(t, "can0", addr.String())
    12  }
    13  
    14  func TestCanRawAddr_String(t *testing.T) {
    15  	addr := &canRawAddr{device: "can0"}
    16  	assert.Equal(t, "can", addr.Network())
    17  }