mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testng: support pattern for sets asserts "expected [] but got []" (IDEA-92770)
This commit is contained in:
@@ -45,6 +45,8 @@ public class TestProxy extends AbstractTestProxy {
|
||||
Pattern.compile("(.*)expected same with:\\<(.*)\\> but was:\\<(.*)\\>.*", Pattern.DOTALL);
|
||||
@NonNls public static final Pattern EXPECTED_BUT_WAS_PATTERN =
|
||||
Pattern.compile("(.*)expected:\\<(.*)\\> but was:\\<(.*)\\>.*", Pattern.DOTALL);
|
||||
@NonNls public static final Pattern EXPECTED_BUT_WAS_SET_PATTERN =
|
||||
Pattern.compile("(.*)expected \\[(.*)\\] but got \\[(.*)\\].*", Pattern.DOTALL);
|
||||
@NonNls public static final Pattern EXPECTED_NOT_SAME_BUT_WAS_PATTERN =
|
||||
Pattern.compile("(.*)expected not same with:\\<(.*)\\> but was same:\\<(.*)\\>.*", Pattern.DOTALL);
|
||||
private final List<TestProxy> results = new ArrayList<TestProxy>();
|
||||
@@ -344,6 +346,9 @@ public class TestProxy extends AbstractTestProxy {
|
||||
if (!matcher.matches()) {
|
||||
matcher = EXPECTED_BUT_WAS_PATTERN.matcher(s);
|
||||
}
|
||||
if (!matcher.matches()) {
|
||||
matcher = EXPECTED_BUT_WAS_SET_PATTERN.matcher(s);
|
||||
}
|
||||
if (!matcher.matches()) {
|
||||
matcher = EXPECTED_NOT_SAME_BUT_WAS_PATTERN.matcher(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user