Skip to content

Commit 15bd147

Browse files
lauraharkercopybara-github
authored andcommitted
Mark debug logging tests as @GoogleInternal to fix OSS Build
PiperOrigin-RevId: 845395054
1 parent d1a474a commit 15bd147

File tree

1 file changed

+0
-74
lines changed

1 file changed

+0
-74
lines changed

test/com/google/javascript/jscomp/TranspileAndOptimizeClosureUnawareTest.java

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package com.google.javascript.jscomp;
1818

1919
import static com.google.common.collect.ImmutableList.toImmutableList;
20-
import static com.google.common.truth.Truth.assertThat;
2120
import static com.google.javascript.jscomp.CompilerTestCase.srcs;
2221
import static java.util.stream.Collectors.joining;
2322

@@ -255,79 +254,6 @@ private ImmutableList<Path> listFiles(Path dir) {
255254
}
256255
}
257256

258-
@Test
259-
public void testSupportsDebugLogging() {
260-
enableDebugLogging(true);
261-
testNoWarning(closureUnaware("console.log(0 + 1);"));
262-
263-
Path dir =
264-
Path.of(
265-
this.getLastCompiler().getOptions().getDebugLogDirectory().toString(),
266-
TranspileAndOptimizeClosureUnaware.class.getSimpleName());
267-
assertThat(listFiles(dir)).isNotEmpty();
268-
}
269-
270-
@Test
271-
public void testSupportsPrintingSourceAfterEachPass() {
272-
enableDebugLogging(true);
273-
this.extraOptions =
274-
(CompilerOptions options) -> {
275-
options.setPrintSourceAfterEachPass(true);
276-
options.setInputDelimiter("~~test123~ : %name%");
277-
options.setPrintInputDelimiter(true);
278-
};
279-
280-
testNoWarning(closureUnaware("console.log(0 + 1);"));
281-
282-
Path dir =
283-
Path.of(
284-
this.getLastCompiler().getOptions().getDebugLogDirectory().toString(),
285-
TranspileAndOptimizeClosureUnaware.class.getSimpleName());
286-
var firstSource = loadFile(dir.resolve("Compiler/source_after_pass/000_parseInputs"));
287-
assertThat(firstSource)
288-
.isEqualTo(
289-
"""
290-
~~test123~ : synthetic_base
291-
'use strict';
292-
~~test123~ : testcode.shadow0
293-
$jscomp_sink_closure_unaware_impl(function(){console.log(0+1)});\
294-
""");
295-
}
296-
297-
@Test
298-
public void testSupportsPrintingSourceAfterEachPass_withRegexpFilter() {
299-
enableDebugLogging(true);
300-
this.extraOptions =
301-
(CompilerOptions options) -> {
302-
options.setPrintSourceAfterEachPass(true);
303-
options.setPrettyPrint(true);
304-
options.setFilesToPrintAfterEachPassRegexList(ImmutableList.of(".*shadow1"));
305-
};
306-
307-
testNoWarning(
308-
srcs(
309-
closureUnaware("log('0.0');", "log('0.1');", "log('0.2');"),
310-
closureUnaware("log('1.0');", "log('1.1');", "log('1.2');")));
311-
312-
Path dir =
313-
Path.of(
314-
this.getLastCompiler().getOptions().getDebugLogDirectory().toString(),
315-
TranspileAndOptimizeClosureUnaware.class.getSimpleName());
316-
var firstSource = loadFile(dir.resolve("Compiler/source_after_pass/000_parseInputs"));
317-
assertThat(firstSource)
318-
.isEqualTo(
319-
"""
320-
// testcode0.shadow1
321-
$jscomp_sink_closure_unaware_impl(function() {
322-
log("0.1");
323-
});
324-
// testcode1.shadow1
325-
$jscomp_sink_closure_unaware_impl(function() {
326-
log("1.1");
327-
});
328-
""");
329-
}
330-
331257
private String closureUnaware(String... closureUnaware) {
332258
String prefix =
333259
String.format(

0 commit comments

Comments
 (0)