Skip to content

Commit

Permalink
Fix bug reference in goog.scope tests.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167795768
  • Loading branch information
tbreisacher authored and blickly committed Sep 8, 2017
1 parent deb0130 commit 6a05b05
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions test/com/google/javascript/jscomp/ScopedAliasesTest.java
Expand Up @@ -970,7 +970,8 @@ public void testIssue1144() {
"$jscomp.scope.x = null;"); "$jscomp.scope.x = null;");
} }


public void testIssue2210() { // https://github.com/google/closure-compiler/issues/2211
public void testIssue2211() {
test( test(
LINE_JOINER.join( LINE_JOINER.join(
"var ns = {};", "var ns = {};",
Expand All @@ -988,17 +989,18 @@ public void testIssue2210() {
"};")); "};"));
} }


public void testIssue2210b() { // https://github.com/google/closure-compiler/issues/2211
public void testIssue2211b() {
test( test(
LINE_JOINER.join( LINE_JOINER.join(
"var ns = {};", "var ns = {};",
"var y = 1;", "var y = 1;",
"goog.scope(function () {", "goog.scope(function () {",
" function x(y) {}", " function x(y) {}",
" ns.fact = function y(n) {", " ns.fact = function y(n) {",
" return n == 1 ? 1 : n * y(n - 1);", " return n == 1 ? 1 : n * y(n - 1);",
" };", " };",
"});"), "});"),
LINE_JOINER.join( LINE_JOINER.join(
SCOPE_NAMESPACE, SCOPE_NAMESPACE,
"var ns = {};", "var ns = {};",
Expand All @@ -1009,12 +1011,14 @@ public void testIssue2210b() {
"};")); "};"));
} }


public void testIssue2210c() { // https://github.com/google/closure-compiler/issues/2211
public void testIssue2211c() {
testScoped( testScoped(
LINE_JOINER.join( LINE_JOINER.join(
"foo(() => {", "foo(() => {",
" const y = function y() {", " const y = function y() {",
" use(y);", " };", " use(y);",
" };",
"});"), "});"),
LINE_JOINER.join( LINE_JOINER.join(
"foo(() => {", "foo(() => {",
Expand Down

0 comments on commit 6a05b05

Please sign in to comment.