mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
extend hamcrest matcher pattern (IDEA-169144)
This commit is contained in:
@@ -24,4 +24,11 @@ public class JUnitExpectedPatternsTest {
|
||||
public void testArrayComparison() throws Exception {
|
||||
Assert.assertNotNull(ExpectedPatterns.createExceptionNotification("arrays first differed at element [0]; expected: java.lang.String<Text> but was: java.lang.StringBuilder<Text>"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHamcrestAssertThatWithReason() throws Exception {
|
||||
Assert.assertNotNull(ExpectedPatterns.createExceptionNotification("reason\n" +
|
||||
"Expected: is \"aaa\\naa\"\n" +
|
||||
" but: was \"bbb\\nbb\""));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ExpectedPatterns extends AbstractExpectedPatterns {
|
||||
|
||||
private static final String[] PATTERN_STRINGS = new String[]{
|
||||
"\nexpected: is \"(.*)\"\n\\s*got: \"(.*)\"\n",
|
||||
"\nexpected: is \"(.*)\"\n\\s*but: was \"(.*)\"",
|
||||
".*?\nexpected: is \"(.*)\"\n\\s*but: was \"(.*)\"",
|
||||
"\nexpected: (.*)\n\\s*got: (.*)",
|
||||
".*?\\s*expected same:<(.*)> was not:<(.*)>",
|
||||
".*?\\s*expected:<(.*?)> but was:<(.*?)>",
|
||||
|
||||
Reference in New Issue
Block a user