github.com/bytedance/go-tagexpr@v2.7.5-0.20210114074101-de5b8743ad85+incompatible/selector_test.go (about)

     1  package tagexpr
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestExprSelector(t *testing.T) {
    10  	es := ExprSelector("F1.Index")
    11  	field, ok := es.ParentField()
    12  	assert.True(t, ok)
    13  	assert.Equal(t, "F1", field)
    14  }