Skip to content

Commit

Permalink
Update filter_test.go's function documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JanHoefelmeyer committed Sep 25, 2023
1 parent 22e6d49 commit 17945d6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/filter/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"testing"
)

// NewPatternMatcher compiles a new list of regular expression from
// a given list of strings.
// TestNewPatternMatcher tests if NewPatternMatcher recognizes
// whether a set of sample regular expressions is valid
func TestNewPatternMatcher(t *testing.T) {
var regex []string
if pm, err := NewPatternMatcher(regex); pm == nil || err != nil {
Expand All @@ -26,7 +26,8 @@ func TestNewPatternMatcher(t *testing.T) {
}
}

// Matches returns true if the given string matches any of the expressions.
// TestMatches tests if Matches returns whether a given string
// matches a sample of the expressions correctly.
func TestMatches(t *testing.T) {
regex := []string{"a"}
pm, _ := NewPatternMatcher(regex)
Expand Down

0 comments on commit 17945d6

Please sign in to comment.