compiler.addNewScript(ast);
}
protected void assertNoWarningsOrErrors(Result result) {
assertNumWarningsAndErrors(result, 0, 0);
}
<BUG>protected void assertNumWarningsAndErrors(Result result, int e, int w) {
assertEquals(
"Unexpected warnings:\n" + Joiner.on("\n").join(result.warnings),
w,
result.warnings.length);
assertEquals(
"Unexpected errors:\n" + Joiner.on("\n").join(result.errors), e, result.errors.length);
assertEquals(e == 0, result.success);</BUG>
}

compiler.addNewScript(ast);
}
protected void assertNoWarningsOrErrors(Result result) {
assertNumWarningsAndErrors(result, 0, 0);
}
protected void assertNumWarningsAndErrors(Result result, int e, int w) {
assertThat(result.warnings).hasLength(w);
assertThat(result.errors).hasLength(e);
assertThat(result.success).isEqualTo(e == 0);
}
