diff options
| author | Paul Buetow <paul@buetow.org> | 2021-10-09 21:10:29 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-10 13:36:41 +0300 |
| commit | 97747ea0f3178f7f5890512d483fdccaa82846b0 (patch) | |
| tree | 9ff1335ca26afc90e55fd6de416457e252d75a35 /internal/regex/regex_test.go | |
| parent | 7a7169791a64190e1002e38bc9c04ad0d5c1ce1f (diff) | |
vetting and linting and some code restyling
Diffstat (limited to 'internal/regex/regex_test.go')
| -rw-r--r-- | internal/regex/regex_test.go | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/internal/regex/regex_test.go b/internal/regex/regex_test.go index 2ce49ac..033a286 100644 --- a/internal/regex/regex_test.go +++ b/internal/regex/regex_test.go @@ -9,7 +9,8 @@ func TestRegex(t *testing.T) { r := NewNoop() if !r.MatchString(input) { - t.Errorf("expected to match string '%s' with noop regex '%v' but didn't\n", input, r) + t.Errorf("expected to match string '%s' with noop regex '%v' but didn't\n", + input, r) } r, err := New(".hello", Default) @@ -17,7 +18,8 @@ func TestRegex(t *testing.T) { t.Errorf("unable to create regex: %v\n", err) } if r.MatchString(input) { - t.Errorf("expected to match string '%s' with regex '%v' but didn't\n", input, r) + t.Errorf("expected to match string '%s' with regex '%v' but didn't\n", + input, r) } serialized, err := r.Serialize() @@ -29,8 +31,8 @@ func TestRegex(t *testing.T) { t.Errorf("unable to serialize deserialized regex: %v: %v\n", serialized, err) } if r.String() != r2.String() { - t.Errorf("regex should be the same after deserialize(serialize(..)), got '%s' but expected '%s'.\n", - r2.String(), r.String()) + t.Errorf("regex should be the same after deserialize(serialize(..)), got "+ + "'%s' but expected '%s'.\n", r2.String(), r.String()) } r, err = New(".hello", Invert) @@ -38,7 +40,8 @@ func TestRegex(t *testing.T) { t.Errorf("unable to create regex: %v\n", err) } if !r.MatchString(input) { - t.Errorf("expected to not match string '%s' with regex '%v' but matched\n", input, r) + t.Errorf("expected to not match string '%s' with regex '%v' but matched\n", + input, r) } serialized, err = r.Serialize() @@ -50,7 +53,7 @@ func TestRegex(t *testing.T) { t.Errorf("unable to serialize deserialized regex: %v: %v\n", serialized, err) } if r.String() != r2.String() { - t.Errorf("regex should be the same after deserialize(serialize(..)), got '%s' but expected '%s'.\n", - r2.String(), r.String()) + t.Errorf("regex should be the same after deserialize(serialize(..)), got "+ + "'%s' but expected '%s'.\n", r2.String(), r.String()) } } |
