Correct misleading test cases.
testWarning() when given 2 strings and an error message will treat the
first as externs, but these test cases were written assuming the
strings were source and expected output.
@@ -144,17 +144,6 @@ public final class CollapsePropertiesTest extends CompilerTestCase {
@Test
public void doNotCollapseAStaticPropertyReadInAStaticMethod() {
testWarning(
- lines(
- "class C {",
- " /** @return {number} */",
- " static getP() { return this.p_; }",
- "}",
- // declaration and initialization of private static field
- "/** @private {number} */",
- "C.p_ = 1;",
- // reference via method
- "alert(C.getP());",
- ""),
lines(
"class C {",
" /** @return {number} */",
@@ -173,18 +162,6 @@ public final class CollapsePropertiesTest extends CompilerTestCase {
@Test
public void doNotCollapseAStaticPropertyAssignedInAStaticMethod() {
testWarning(
- lines(
- "class C {",
- " /** @param {number} v */",
- " static setP(v) { this.p_ = v; }",
- "}",
- // declaration and initialization of private static field
- "/** @private {number} */",
- "C.p_ = 0;",
- // changing private static field through method
- "C.setP(1);",
- "alert(C.p_);",
- ""),
lines(
"class C {",
" /** @param {number} v */",
