mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Update filter_test.go's function documentation
This commit is contained in:
parent
22e6d49f3f
commit
17945d67ac
1 changed files with 4 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue