Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8229186: Improve error messages for TestStringIntrinsics failures #112

Closed
wants to merge 14 commits into from
Closed
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
10 changes: 1 addition & 9 deletions test/lib/jdk/test/lib/format/ArrayDiff.java
Original file line number Diff line number Diff line change
@@ -75,14 +75,6 @@ public class ArrayDiff<E> implements Diff {
private final ArrayCodec<E> first;
private final ArrayCodec<E> second;

/**
* Default limits for the formatter
*/
public static class Defaults {
public final static int WIDTH = 80;
public final static int CONTEXT_BEFORE = 2;
}

private ArrayDiff(ArrayCodec<E> first, ArrayCodec<E> second,
int width, int getContextBefore) {
this.first = first;
@@ -101,7 +93,7 @@ private ArrayDiff(ArrayCodec<E> first, ArrayCodec<E> second,
* @return an ArrayDiff instance for the two arrays
*/
public static ArrayDiff of(Object first, Object second) {
return ArrayDiff.of(first, second, Defaults.WIDTH, Defaults.CONTEXT_BEFORE);
return ArrayDiff.of(first, second, Diff.Defaults.WIDTH, Diff.Defaults.CONTEXT_BEFORE);
}

/**
8 changes: 8 additions & 0 deletions test/lib/jdk/test/lib/format/Diff.java
Original file line number Diff line number Diff line change
@@ -31,6 +31,14 @@
*/
public interface Diff {

/**
* Default limits for formatters
*/
public static class Defaults {
public final static int WIDTH = 80;
public final static int CONTEXT_BEFORE = 2;
}

/**
* Formats the given diff. Different implementations can provide different
* result and formatting style.