Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Sort methods
  • Loading branch information
ppkarwasz committed Apr 12, 2026
commit b047d7a8501514d31eca74bdc8b08a8a5b1a3854
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ class GitIdentifiersTest {
// hello.txt (regular file)
// run.sh (executable file)

/** Decodes a compile-time hex literal; throws {@link AssertionError} on malformed input. */
private static byte[] hex(final String hex) {
try {
return Hex.decodeHex(hex);
} catch (final DecoderException e) {
throw new AssertionError(e);
}
}

/** Content of {@code src/hello.txt}. */
private static final byte[] HELLO_CONTENT = "hello\n".getBytes(StandardCharsets.UTF_8);
/** SHA-1 blob id of {@link #HELLO_CONTENT}: {@code printf 'hello\n' | git hash-object --stdin} */
Expand Down Expand Up @@ -146,6 +137,15 @@ static Stream<Arguments> blobIdProvider() {
Arguments.of("DigestUtilsTest/subdir/nested.txt", "07a392ddb4dbff06a373a7617939f30b2dcfe719"));
}

/** Decodes a compile-time hex literal; throws {@link AssertionError} on malformed input. */
private static byte[] hex(final String hex) {
try {
return Hex.decodeHex(hex);
} catch (final DecoderException e) {
throw new AssertionError(e);
}
}

private static Path resourcePath(final String resourceName) throws Exception {
return Paths.get(GitIdentifiersTest.class.getClassLoader().getResource(resourceName).toURI());
}
Expand Down
Loading