From 17945d67aca5d1282cda67da70f3d4d14790c301 Mon Sep 17 00:00:00 2001 From: JanHoefelmeyer Date: Mon, 25 Sep 2023 11:19:32 +0200 Subject: [PATCH] Update filter_test.go's function documentation --- internal/filter/filter_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/filter/filter_test.go b/internal/filter/filter_test.go index fdbe3bc..775a14b 100644 --- a/internal/filter/filter_test.go +++ b/internal/filter/filter_test.go @@ -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)