Skip to content

Commit

Permalink
Wrap some lines that were accidentally unwrapped and document a known…
Browse files Browse the repository at this point in the history
… issue in ProcessDefinesTest.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=244971265
  • Loading branch information
shicks authored and blickly committed Apr 25, 2019
1 parent 77c7860 commit ccc1f68
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions test/com/google/javascript/jscomp/ProcessDefinesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,21 @@ public void testSimpleReassign3() {

@Test
public void testDefineAssignedToSimpleAlias() {
test(
testSame(
lines(
"const x = true;", "const ALIAS = x;", "/** @define {boolean} */ const DEF2 = ALIAS;"),
"const x = true;", //
"const ALIAS = x;",
"/** @define {boolean} */ const DEF2 = ALIAS;"));
}

@Test
public void testDefineAssignedToEnumAlias() {
testError(
lines(
"const x = true", "const ALIAS = x;", "/** @define {boolean} */ const DEF2 = ALIAS;"));
"/** @enum {string} */ const E = {A: 'a'};", //
"/** @define {string} */ const DEF2 = E.A;"),
// TODO(sdh): It would be nice if this worked, but doesn't seem worth implementing.
ProcessDefines.INVALID_DEFINE_INIT_ERROR);
}

@Test
Expand Down

0 comments on commit ccc1f68

Please sign in to comment.