Skip to content
Permalink
Browse files

fixed tests

  • Loading branch information...
hsz committed May 7, 2019
1 parent b1d2aba commit 6c4dab3c22dbb86d33d10e8148c7472aae093b6a
Showing with 1 addition and 5 deletions.
  1. +1 −5 tests/mobi/hsz/idea/gitignore/util/MatcherUtilTest.java
@@ -27,7 +27,6 @@
import mobi.hsz.idea.gitignore.Common;
import org.junit.Test;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class MatcherUtilTest extends Common<MatcherUtil> {
@@ -79,14 +78,11 @@ public void testMatchAnyPart() {
public void testGetParts() {
Pattern pattern = Pattern.compile("foo[ba]rbuz.*hi");

assertEquals(MatcherUtil.getParts((Pattern) null).length, 0);
assertEquals(MatcherUtil.getParts((Matcher) null).length, 0);
assertEquals(MatcherUtil.getParts(null).length, 0);

assertEquals(MatcherUtil.getParts(pattern).length, 2);
assertEquals(MatcherUtil.getParts(pattern.matcher("")).length, 2);

pattern = Pattern.compile("$$_!@[fd]");
assertEquals(MatcherUtil.getParts(pattern).length, 0);
assertEquals(MatcherUtil.getParts(pattern.matcher("")).length, 0);
}
}

0 comments on commit 6c4dab3

Please sign in to comment.
You can’t perform that action at this time.