...

Source file src/go.einride.tech/aip/fieldmask/wildcard_test.go

Documentation: go.einride.tech/aip/fieldmask

     1  package fieldmask
     2  
     3  import (
     4  	"testing"
     5  
     6  	"google.golang.org/protobuf/types/known/fieldmaskpb"
     7  	"gotest.tools/v3/assert"
     8  )
     9  
    10  func TestIsFullReplacement(t *testing.T) {
    11  	t.Parallel()
    12  	assert.Assert(t, IsFullReplacement(&fieldmaskpb.FieldMask{Paths: []string{WildcardPath}}))
    13  	assert.Assert(t, !IsFullReplacement(&fieldmaskpb.FieldMask{Paths: []string{WildcardPath, "foo"}}))
    14  	assert.Assert(t, !IsFullReplacement(&fieldmaskpb.FieldMask{Paths: []string{"foo"}}))
    15  	assert.Assert(t, !IsFullReplacement(nil))
    16  }
    17  

View as plain text