Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2013-06-04 11:17:19 +0000
committerDani Megert2013-06-04 11:17:19 +0000
commitd74439394698df3f60bc15a5fa81fc59db2367f5 (patch)
treefa34aff6fdc9a8673dd52e42bef11abe5c4f21f3 /org.eclipse.core.filebuffers.tests
parentceddeb903a32bd3eacd05343555a66f96420275f (diff)
downloadeclipse.platform.text-d74439394698df3f60bc15a5fa81fc59db2367f5.tar.gz
eclipse.platform.text-d74439394698df3f60bc15a5fa81fc59db2367f5.tar.xz
eclipse.platform.text-d74439394698df3f60bc15a5fa81fc59db2367f5.zip
Provide more details when FileBuffersForFilesInLinkedFolders.test15 fails (see bug 409810)R4_3M20130724-0800M20130717-0800M20130710-0800M20130703-0800I20130618-0800I20130605-2000I20130604-2000
Diffstat (limited to 'org.eclipse.core.filebuffers.tests')
-rw-r--r--org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBufferFunctions.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBufferFunctions.java b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBufferFunctions.java
index 56f6c915942..ea814faabbb 100644
--- a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBufferFunctions.java
+++ b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBufferFunctions.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -813,9 +813,19 @@ public abstract class FileBufferFunctions extends TestCase {
fileBuffer= fManager.getTextFileBuffer(fPath, LocationKind.NORMALIZE);
IPath newLocation= moveUnderlyingFile();
if (newLocation != null) {
- assertTrue(listener.count == 1);
- assertTrue(listener.buffer == fileBuffer);
- assertEquals(listener.newLocation, newLocation);
+ if (listener.count != 1 || listener.buffer != fileBuffer || !newLocation.equals(listener.newLocation)) {
+ StringBuffer buf= new StringBuffer();
+ buf.append("Wrong listener notifcation in " + getClass().getName() + ":\n");
+ buf.append("listener.count: " + listener.count + " (expected: 1)\n");
+ if (newLocation.equals(listener.newLocation))
+ buf.append("newLocation identical: true\n");
+ else {
+ buf.append("listener.newLocation: " + listener.newLocation + "\n");
+ buf.append("newLocation: " + newLocation + "\n");
+ }
+ buf.append("buffers identical: " + new Boolean(listener.buffer == fileBuffer));
+ fail(buf.toString());
+ }
}
} finally {

Back to the top