github.com/ldez/golangci-lint@v1.10.1/pkg/result/processors/max_same_issues_test.go (about)

     1  package processors
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/golangci/golangci-lint/pkg/logutils"
     7  	"github.com/golangci/golangci-lint/pkg/result"
     8  )
     9  
    10  func TestMaxSameIssues(t *testing.T) {
    11  	p := NewMaxSameIssues(1, logutils.NewStderrLog(""))
    12  	i1 := result.Issue{
    13  		Text: "1",
    14  	}
    15  	i2 := result.Issue{
    16  		Text: "2",
    17  	}
    18  
    19  	processAssertSame(t, p, i1)  // ok
    20  	processAssertSame(t, p, i2)  // ok: another
    21  	processAssertEmpty(t, p, i1) // skip
    22  }