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"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewPatternMatcher compiles a new list of regular expression from
|
// TestNewPatternMatcher tests if NewPatternMatcher recognizes
|
||||||
// a given list of strings.
|
// whether a set of sample regular expressions is valid
|
||||||
func TestNewPatternMatcher(t *testing.T) {
|
func TestNewPatternMatcher(t *testing.T) {
|
||||||
var regex []string
|
var regex []string
|
||||||
if pm, err := NewPatternMatcher(regex); pm == nil || err != nil {
|
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) {
|
func TestMatches(t *testing.T) {
|
||||||
regex := []string{"a"}
|
regex := []string{"a"}
|
||||||
pm, _ := NewPatternMatcher(regex)
|
pm, _ := NewPatternMatcher(regex)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue