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

Update naming #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ private void dumpResult(JMethod method, String id,
Object result = resultGetter.apply(method, id);
if (result instanceof Set) {
((Set<?>) result).forEach(e -> out.println(toString(e)));
} else if (result instanceof StmtResult<?> StmtResult) {
} else if (result instanceof StmtResult<?> stmtResult) {
IR ir = method.getIR();
ir.forEach(stmt -> out.println(toString(stmt, StmtResult)));
ir.forEach(stmt -> out.println(toString(stmt, stmtResult)));
} else {
out.println(toString(result));
}
Expand Down Expand Up @@ -232,12 +232,12 @@ private void compareResult(JMethod method, String id,
" should be included");
}
});
} else if (result instanceof StmtResult<?> StmtResult) {
} else if (result instanceof StmtResult<?> stmtResult) {
Set<String> lines = inputs.get(new Pair<>(method.toString(), id));
IR ir = method.getIR();
ir.forEach(stmt -> {
String stmtStr = toString(stmt);
String given = toString(stmt, StmtResult);
String given = toString(stmt, stmtResult);
for (String line : lines) {
if (line.startsWith(stmtStr) && !line.equals(given)) {
int idx = stmtStr.length();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ private void dumpResult(JMethod method, String id,
Object result = resultGetter.apply(method, id);
if (result instanceof Set) {
((Set<?>) result).forEach(e -> out.println(toString(e)));
} else if (result instanceof StmtResult<?> StmtResult) {
} else if (result instanceof StmtResult<?> stmtResult) {
IR ir = method.getIR();
ir.forEach(stmt -> out.println(toString(stmt, StmtResult)));
ir.forEach(stmt -> out.println(toString(stmt, stmtResult)));
} else {
out.println(toString(result));
}
Expand Down Expand Up @@ -232,12 +232,12 @@ private void compareResult(JMethod method, String id,
" should be included");
}
});
} else if (result instanceof StmtResult<?> StmtResult) {
} else if (result instanceof StmtResult<?> stmtResult) {
Set<String> lines = inputs.get(new Pair<>(method.toString(), id));
IR ir = method.getIR();
ir.forEach(stmt -> {
String stmtStr = toString(stmt);
String given = toString(stmt, StmtResult);
String given = toString(stmt, stmtResult);
for (String line : lines) {
if (line.startsWith(stmtStr) && !line.equals(given)) {
int idx = stmtStr.length();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ private void dumpResult(JMethod method, String id,
Object result = resultGetter.apply(method, id);
if (result instanceof Set) {
((Set<?>) result).forEach(e -> out.println(toString(e)));
} else if (result instanceof StmtResult<?> StmtResult) {
} else if (result instanceof StmtResult<?> stmtResult) {
IR ir = method.getIR();
ir.forEach(stmt -> out.println(toString(stmt, StmtResult)));
ir.forEach(stmt -> out.println(toString(stmt, stmtResult)));
} else {
out.println(toString(result));
}
Expand Down Expand Up @@ -232,12 +232,12 @@ private void compareResult(JMethod method, String id,
" should be included");
}
});
} else if (result instanceof StmtResult<?> StmtResult) {
} else if (result instanceof StmtResult<?> stmtResult) {
Set<String> lines = inputs.get(new Pair<>(method.toString(), id));
IR ir = method.getIR();
ir.forEach(stmt -> {
String stmtStr = toString(stmt);
String given = toString(stmt, StmtResult);
String given = toString(stmt, stmtResult);
for (String line : lines) {
if (line.startsWith(stmtStr) && !line.equals(given)) {
int idx = stmtStr.length();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ private void dumpResult(JMethod method, String id,
Object result = resultGetter.apply(method, id);
if (result instanceof Set) {
((Set<?>) result).forEach(e -> out.println(toString(e)));
} else if (result instanceof StmtResult<?> StmtResult) {
} else if (result instanceof StmtResult<?> stmtResult) {
IR ir = method.getIR();
ir.forEach(stmt -> out.println(toString(stmt, StmtResult)));
ir.forEach(stmt -> out.println(toString(stmt, stmtResult)));
} else {
out.println(toString(result));
}
Expand Down Expand Up @@ -268,7 +268,7 @@ private void compareResult(JMethod method, String id,
" should be included");
}
});
} else if (result instanceof StmtResult<?> StmtResult) {
} else if (result instanceof StmtResult<?> stmtResult) {
Set<String> lines = inputs.get(new Pair<>(method.toString(), id));
// if the expected input does not contain the results
// for the given method, just skip
Expand All @@ -278,7 +278,7 @@ private void compareResult(JMethod method, String id,
IR ir = method.getIR();
ir.forEach(stmt -> {
String stmtStr = toString(stmt);
String given = toString(stmt, StmtResult);
String given = toString(stmt, stmtResult);
boolean foundExpeceted = false;
for (String line : lines) {
if (line.startsWith(stmtStr)) {
Expand Down