use of com.google.javascript.jscomp.StrictWarningsGuard in project closure-compiler by google.
the class IntegrationTest method testStrictWarningsGuard.
@Test
public void testStrictWarningsGuard() {
CompilerOptions options = createCompilerOptions();
options.setCheckTypes(true);
options.addWarningsGuard(new StrictWarningsGuard());
Compiler compiler = compile(options, "/** @return {number} */ function f() { return true; }");
assertThat(compiler.getErrors()).hasSize(1);
assertThat(compiler.getWarnings()).isEmpty();
}
Aggregations