1
2
3
4
5
6
7
8
9
10
11
12
13 package org.eclipse.jgit.internal.storage.file;
14
15 import static org.junit.Assert.assertFalse;
16 import static org.junit.Assert.fail;
17
18 import java.io.File;
19
20 import org.eclipse.jgit.errors.MissingObjectException;
21 import org.eclipse.jgit.junit.JGitTestUtil;
22 import org.eclipse.jgit.lib.ObjectId;
23 import org.junit.Test;
24
25 public class PackIndexV1Test extends PackIndexTestCase {
26 @Override
27 public File getFileForPack34be9032() {
28 return JGitTestUtil.getTestResourceFile(
29 "pack-34be9032ac282b11fa9babdc2b2a93ca996c9c2f.idx");
30 }
31
32 @Override
33 public File getFileForPackdf2982f28() {
34 return JGitTestUtil.getTestResourceFile(
35 "pack-df2982f284bbabb6bdb59ee3fcc6eb0983e20371.idx");
36 }
37
38
39
40
41
42
43 @Override
44 @Test
45 public void testCRC32() throws MissingObjectException {
46 assertFalse(smallIdx.hasCRC32Support());
47 try {
48 smallIdx.findCRC32(ObjectId
49 .fromString("4b825dc642cb6eb9a060e54bf8d69288fbee4904"));
50 fail("index V1 shouldn't support CRC");
51 } catch (UnsupportedOperationException x) {
52
53 }
54 }
55 }