diff options
author | Michael Valenta | 2006-11-10 21:11:03 +0000 |
---|---|---|
committer | Michael Valenta | 2006-11-10 21:11:03 +0000 |
commit | 86896f427c29566de9dc11e147bb5be37a1dc343 (patch) | |
tree | e77d58e723011a50878e24b8aa36a5b582e6a936 /tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java | |
parent | 9a0688e9b931972c7271b1f7c32001084e75844a (diff) | |
download | eclipse.platform.team-86896f427c29566de9dc11e147bb5be37a1dc343.tar.gz eclipse.platform.team-86896f427c29566de9dc11e147bb5be37a1dc343.tar.xz eclipse.platform.team-86896f427c29566de9dc11e147bb5be37a1dc343.zip |
Bug 163051 'Verify Patch' wizard page is hard to use
Diffstat (limited to 'tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java')
-rw-r--r-- | tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java index 1e5496eb6..be86e9820 100644 --- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java +++ b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java @@ -10,19 +10,13 @@ *******************************************************************************/ package org.eclipse.compare.tests; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.ArrayList; +import java.io.*; import java.util.List; import junit.framework.Assert; import junit.framework.TestCase; -import org.eclipse.compare.internal.patch.Diff; -import org.eclipse.compare.internal.patch.LineReader; -import org.eclipse.compare.internal.patch.WorkspacePatcher; +import org.eclipse.compare.internal.patch.*; public class PatchTest extends TestCase { @@ -114,11 +108,11 @@ public class PatchTest extends TestCase { e.printStackTrace(); } - Diff[] diffs= patcher.getDiffs(); + FileDiff[] diffs= patcher.getDiffs(); Assert.assertEquals(diffs.length, 1); - List failedHunks= new ArrayList(); - patcher.patch(diffs[0], inLines, failedHunks); + FileDiffResult diffResult = patcher.getDiffResult(diffs[0]); + diffResult.patch(inLines); LineReader expectedContents= new LineReader(getReader(expt)); List expectedLines= expectedContents.readLines(); @@ -154,7 +148,7 @@ public class PatchTest extends TestCase { } //Sort the diffs by project - Diff[] diffs= patcher.getDiffs(); + FileDiff[] diffs= patcher.getDiffs(); //Iterate through all of the original files, apply the diffs that belong to the file and compare //with the corresponding outcome file @@ -163,8 +157,8 @@ public class PatchTest extends TestCase { List inLines= lr.readLines(); - List failedHunks= new ArrayList(); - patcher.patch(diffs[i], inLines, failedHunks); + FileDiffResult diffResult = patcher.getDiffResult(diffs[i]); + diffResult.patch(inLines); LineReader expectedContents= new LineReader(getReader(expectedOutcomeFiles[i])); List expectedLines= expectedContents.readLines(); |