mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
IJ-CR-120449 [TestFramework] reverted inlining of getActual and getExpected util methods.
Commit with unexpected inlining: 759e88f8ab3a6820aca8e967b2a1783626b7ba86 GitOrigin-RevId: 267a6cd643bcb3db53d98c5b734ac493f7c1b6e8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bf11fe39ed
commit
e8f627c3c2
@@ -286,8 +286,8 @@ public class ComparisonFailureData {
|
||||
|
||||
private static ComparisonFailureData createJunitComparisonFailure(Throwable assertion) {
|
||||
try {
|
||||
String expected = get(assertion, EXPECTED, "fExpected");
|
||||
String actual = get(assertion, ACTUAL, "fActual");
|
||||
String expected = getExpected(assertion);
|
||||
String actual = getActual(assertion);
|
||||
return new ComparisonFailureData(expected, actual);
|
||||
}
|
||||
catch (IllegalAccessException | NoSuchFieldException e) {
|
||||
@@ -295,6 +295,14 @@ public class ComparisonFailureData {
|
||||
}
|
||||
}
|
||||
|
||||
public static String getActual(Throwable assertion) throws IllegalAccessException, NoSuchFieldException {
|
||||
return get(assertion, ACTUAL, "fActual");
|
||||
}
|
||||
|
||||
public static String getExpected(Throwable assertion) throws IllegalAccessException, NoSuchFieldException {
|
||||
return get(assertion, EXPECTED, "fExpected");
|
||||
}
|
||||
|
||||
private static String get(final Throwable assertion, final Map<Class<?>, Field> staticMap, final String fieldName) throws IllegalAccessException, NoSuchFieldException {
|
||||
Class<? extends Throwable> assertionClass = assertion.getClass();
|
||||
for (Class<?> comparisonClass : staticMap.keySet()) {
|
||||
|
||||
Reference in New Issue
Block a user