Cleanup (formatting; duplicated constants)

This commit is contained in:
Roman Shevchenko
2017-03-31 15:16:27 +02:00
parent 7290992c63
commit 0ce5d856bd
3 changed files with 17 additions and 20 deletions
@@ -35,14 +35,14 @@ public class DigesterTest extends UpdaterTestCase {
assertEquals(CHECKSUMS.README_TXT, Digester.digestRegularFile(new File(dataDir, "Readme.txt"), false));
assertEquals(CHECKSUMS.FOCUS_KILLER_DLL, Digester.digestRegularFile(new File(binDir, "focuskiller.dll"), false));
assertEquals(CHECKSUMS.BOOTSTRAP_JAR_BIN, Digester.digestRegularFile(new File(libDir, "bootstrap.jar"), false));
assertEquals(CHECKSUMS.ANNOTATIONS_JAR_NORM, Digester.digestRegularFile(new File(libDir, "annotations.jar"), true));
assertEquals(CHECKSUMS.ANNOTATIONS_CHANGED_JAR_NORM, Digester.digestRegularFile(new File(libDir, "annotations_changed.jar"), true));
assertEquals(CHECKSUMS.BOOT_JAR_NORM, Digester.digestRegularFile(new File(libDir, "boot.jar"), true));
assertEquals(CHECKSUMS.BOOT2_JAR_NORM, Digester.digestRegularFile(new File(libDir, "boot2.jar"), true));
assertEquals(CHECKSUMS.BOOT2_CHANGED_WITH_UNCHANGED_CONTENT_JAR_NORM, Digester.digestRegularFile(new File(libDir, "boot2_changed_with_unchanged_content.jar"), true));
assertEquals(CHECKSUMS.BOOT_WITH_DIRECTORY_BECOMES_FILE_JAR_NORM, Digester.digestRegularFile(new File(libDir, "boot_with_directory_becomes_file.jar"), true));
assertEquals(CHECKSUMS.BOOTSTRAP_JAR_NORM, Digester.digestRegularFile(new File(libDir, "bootstrap.jar"), true));
assertEquals(CHECKSUMS.BOOTSTRAP_DELETED_JAR_NORM, Digester.digestRegularFile(new File(libDir, "bootstrap_deleted.jar"), true));
assertEquals(CHECKSUMS.ANNOTATIONS_JAR, Digester.digestRegularFile(new File(libDir, "annotations.jar"), true));
assertEquals(CHECKSUMS.ANNOTATIONS_CHANGED_JAR, Digester.digestRegularFile(new File(libDir, "annotations_changed.jar"), true));
assertEquals(CHECKSUMS.BOOT_JAR, Digester.digestRegularFile(new File(libDir, "boot.jar"), true));
assertEquals(CHECKSUMS.BOOT2_JAR, Digester.digestRegularFile(new File(libDir, "boot2.jar"), true));
assertEquals(CHECKSUMS.BOOT2_CHANGED_WITH_UNCHANGED_CONTENT_JAR, Digester.digestRegularFile(new File(libDir, "boot2_changed_with_unchanged_content.jar"), true));
assertEquals(CHECKSUMS.BOOT_WITH_DIRECTORY_BECOMES_FILE_JAR, Digester.digestRegularFile(new File(libDir, "boot_with_directory_becomes_file.jar"), true));
assertEquals(CHECKSUMS.BOOTSTRAP_JAR, Digester.digestRegularFile(new File(libDir, "bootstrap.jar"), true));
assertEquals(CHECKSUMS.BOOTSTRAP_DELETED_JAR, Digester.digestRegularFile(new File(libDir, "bootstrap_deleted.jar"), true));
assertEquals(CHECKSUMS.BOOTSTRAP_JAR, Digester.digestZipFile(new File(libDir, "bootstrap.jar")));
}
@@ -264,8 +264,7 @@ public abstract class PatchApplyingRevertingTest extends PatchTestCase {
public void testApplyWhenCommonFileChanges() throws Exception {
Patch patch = PatchFileCreator.create(myPatchSpec, myFile, TEST_UI);
FileUtil.copy(new File(myOlderDir, "/lib/bootstrap.jar"),
new File(myOlderDir, "/lib/boot.jar"));
FileUtil.copy(new File(myOlderDir, "lib/bootstrap.jar"), new File(myOlderDir, "lib/boot.jar"));
PatchFileCreator.PreparationResult preparationResult = PatchFileCreator.prepareAndValidate(myFile, myOlderDir, TEST_UI);
assertThat(preparationResult.validationResults).isEmpty();
@@ -278,7 +277,7 @@ public abstract class PatchApplyingRevertingTest extends PatchTestCase {
myPatchSpec.setStrict(true);
PatchFileCreator.create(myPatchSpec, myFile, TEST_UI);
FileUtil.copy(new File(myOlderDir, "/lib/bootstrap.jar"), new File(myOlderDir, "/lib/boot.jar"));
FileUtil.copy(new File(myOlderDir, "lib/bootstrap.jar"), new File(myOlderDir, "lib/boot.jar"));
PatchFileCreator.PreparationResult preparationResult = PatchFileCreator.prepareAndValidate(myFile, myOlderDir, TEST_UI);
assertThat(preparationResult.validationResults).containsExactly(
@@ -62,18 +62,16 @@ public abstract class UpdaterTestCase {
public final long IDEA_BAT;
public final long ANNOTATIONS_JAR = 2119442657L;
public final long ANNOTATIONS_JAR_BIN = 2525796836L;
public final long ANNOTATIONS_CHANGED_JAR = 4088078858L;
public final long ANNOTATIONS_CHANGED_JAR_BIN = 2587736223L;
public final long BOOT_JAR = 3018038682L;
public final long BOOT_WITH_DIRECTORY_BECOMES_FILE_JAR = 1972168924;
public final long BOOT2_JAR = 2406818996L;
public final long BOOT2_CHANGED_WITH_UNCHANGED_CONTENT_JAR = 2406818996L;
public final long BOOTSTRAP_JAR = 2082851308L;
public final long BOOTSTRAP_JAR_BIN = 2745721972L;
public final long BOOTSTRAP_DELETED_JAR = 544883981L;
public final long FOCUS_KILLER_DLL = 1991212227L;
public final long ANNOTATIONS_JAR_NORM = 2119442657L;
public final long ANNOTATIONS_CHANGED_JAR_BIN = 2587736223L;
public final long ANNOTATIONS_CHANGED_JAR_NORM = 4088078858L;
public final long BOOT_JAR_NORM = 3018038682L;
public final long BOOT2_JAR_NORM = 2406818996L;
public final long BOOT2_CHANGED_WITH_UNCHANGED_CONTENT_JAR_NORM = 2406818996L;
public final long BOOT_WITH_DIRECTORY_BECOMES_FILE_JAR_NORM = 1972168924;
public final long BOOTSTRAP_JAR_NORM = 2082851308;
public final long BOOTSTRAP_DELETED_JAR_NORM = 544883981L;
public final long LINK_TO_README_TXT = 2305843011042707672L;
public final long LINK_TO_DOT_README_TXT = 2305843009503057206L;