mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
test comparison: avoid double lines when trace starts with failure message when we don't detect comparison
This commit is contained in:
@@ -67,13 +67,14 @@ public class ComparisonFailureData {
|
||||
Map attrs,
|
||||
Throwable throwable) {
|
||||
|
||||
final int failureIdx = failureMessage != null ? trace.indexOf(failureMessage) : -1;
|
||||
final int failureMessageLength = failureMessage != null ? failureMessage.length() : 0;
|
||||
attrs.put("details", failureIdx > -1 ? trace.substring(failureIdx + failureMessageLength) : trace);
|
||||
|
||||
if (notification != null) {
|
||||
attrs.put("expected", notification.getExpected());
|
||||
attrs.put("actual", notification.getActual());
|
||||
|
||||
final int failureIdx = failureMessage != null ? trace.indexOf(failureMessage) : -1;
|
||||
final int failureMessageLength = failureMessage != null ? failureMessage.length() : 0;
|
||||
attrs.put("details", failureIdx > -1 ? trace.substring(failureIdx + failureMessageLength) : trace);
|
||||
final String filePath = notification.getFilePath();
|
||||
if (filePath != null) {
|
||||
attrs.put("expectedFile", filePath);
|
||||
@@ -89,8 +90,6 @@ public class ComparisonFailureData {
|
||||
attrs.put("message", comparisonFailureMessage);
|
||||
}
|
||||
else {
|
||||
attrs.put("details", trace);
|
||||
|
||||
Throwable throwableCause = null;
|
||||
try {
|
||||
throwableCause = throwable.getCause();
|
||||
|
||||
Reference in New Issue
Block a user