github.com/influx6/npkg@v0.8.8/nframes/nframe_test.go (about)

     1  package nframes
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/require"
     7  )
     8  
     9  func getName() string {
    10  	return GetCallerName()
    11  }
    12  
    13  func getNameWith2Skip() string {
    14  	return GetCallerNameWith(2)
    15  }
    16  
    17  func TestGetCallerName(t *testing.T) {
    18  	require.Equal(t, "github.com/influx6/npkg/nframes.getName", getName())
    19  	require.NotEqual(t, "github.com/influx6/npkg/nframes.getNameWith2Skip", getNameWith2Skip())
    20  	require.Equal(t, "github.com/influx6/npkg/nframes.TestGetCallerName", getNameWith2Skip())
    21  	require.NotEqual(t, getName(), getNameWith2Skip())
    22  }