Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2007-04-04 15:59:06 +0000
committerDani Megert2007-04-04 15:59:06 +0000
commitd9582a972d94ebd7a93f586f8c65369eec890ff6 (patch)
tree5dc1f7894f2f362b3ba0c188ca23fbce3dbe1443 /org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers
parent51158e8fefde8fc38d61dbcd4c4566688b431641 (diff)
downloadeclipse.platform.text-d9582a972d94ebd7a93f586f8c65369eec890ff6.tar.gz
eclipse.platform.text-d9582a972d94ebd7a93f586f8c65369eec890ff6.tar.xz
eclipse.platform.text-d9582a972d94ebd7a93f586f8c65369eec890ff6.zip
Fixed test failures caused by IFileStore.putInfo now correctly throwing an exception.v20070410-0800
Diffstat (limited to 'org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers')
-rw-r--r--org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBufferFunctions.java9
-rw-r--r--org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBufferFunctions.java9
2 files changed, 12 insertions, 6 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 b4871880459..773c3d3c41e 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
@@ -105,7 +105,8 @@ public abstract class FileBufferFunctions extends TestCase {
IFileStore fileStore= FileBuffers.getFileStoreAtLocation(fPath);
IFileInfo fileInfo= fileStore.fetchInfo();
fileInfo.setLastModified(1000);
- fileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
+ if (fileInfo.exists())
+ fileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
long lastModified= fileStore.fetchInfo().getLastModified();
assertTrue(lastModified == EFS.NONE || !fileBuffer.isSynchronized());
@@ -168,7 +169,8 @@ public abstract class FileBufferFunctions extends TestCase {
IFileInfo fileInfo= fileStore.fetchInfo();
assertEquals(modificationStamp != IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP, fileInfo.exists());
fileInfo.setLastModified(1000);
- fileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
+ if (fileInfo.exists())
+ fileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
long lastModified= fileStore.fetchInfo().getLastModified();
assertTrue(lastModified == EFS.NONE || modificationStamp != fileBuffer.getModificationStamp());
} finally {
@@ -192,7 +194,8 @@ public abstract class FileBufferFunctions extends TestCase {
IFileStore fileStore= FileBuffers.getFileStoreAtLocation(fPath);
IFileInfo fileInfo= fileStore.fetchInfo();
fileInfo.setLastModified(1000);
- fileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
+ if (fileInfo.exists())
+ fileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
//revert
fileBuffer.revert(null);
// check assertions
diff --git a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBufferFunctions.java b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBufferFunctions.java
index cb7920cbb77..d828784d43e 100644
--- a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBufferFunctions.java
+++ b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBufferFunctions.java
@@ -105,7 +105,8 @@ public abstract class FileStoreFileBufferFunctions extends TestCase {
IFileStore fileStore= fFileStore;
IFileInfo fileInfo= fileStore.fetchInfo();
fileInfo.setLastModified(1000);
- fileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
+ if (fileInfo.exists())
+ fileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
long lastModified= fileStore.fetchInfo().getLastModified();
assertTrue(lastModified == EFS.NONE || !fileBuffer.isSynchronized());
@@ -167,7 +168,8 @@ public abstract class FileStoreFileBufferFunctions extends TestCase {
IFileInfo fileInfo= fFileStore.fetchInfo();
assertEquals(modificationStamp != IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP, fileInfo.exists());
fileInfo.setLastModified(1000);
- fFileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
+ if (fileInfo.exists())
+ fFileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
long lastModified= fFileStore.fetchInfo().getLastModified();
assertTrue(lastModified == EFS.NONE || modificationStamp != fileBuffer.getModificationStamp());
} finally {
@@ -190,7 +192,8 @@ public abstract class FileStoreFileBufferFunctions extends TestCase {
// invalidate synchronization state
IFileInfo fileInfo= fFileStore.fetchInfo();
fileInfo.setLastModified(1000);
- fFileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
+ if (fileInfo.exists())
+ fFileStore.putInfo(fileInfo, EFS.SET_LAST_MODIFIED, null);
//revert
fileBuffer.revert(null);
// check assertions

Back to the top