Commit 62d99d3 1 parent d106bbb commit 62d99d3 Copy full SHA for 62d99d3
File tree 2 files changed +12
-17
lines changed
src/com/google/javascript/jscomp
test/com/google/javascript/jscomp/integration
2 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -465,14 +465,11 @@ protected PassListBuilder getChecks() {
465
465
466
466
checks .maybeAdd (createEmptyPass (PassNames .AFTER_STANDARD_CHECKS ));
467
467
468
- if (options .checksOnly ) {
469
- checks .maybeAdd (removeSyntheticScript );
470
- } else if (!options .checksOnly ) {
471
- checks .maybeAdd (mergeSyntheticScript );
472
- // At this point all checks have been done.
473
- if (options .exportTestFunctions ) {
474
- checks .maybeAdd (exportTestFunctions );
475
- }
468
+ checks .maybeAdd (mergeSyntheticScript );
469
+
470
+ // At this point all checks have been done.
471
+ if (!options .checksOnly && options .exportTestFunctions ) {
472
+ checks .maybeAdd (exportTestFunctions );
476
473
}
477
474
478
475
// Create extern exports after the normalize because externExports depends on unique names.
Original file line number Diff line number Diff line change @@ -761,15 +761,13 @@ public void testPolymer_propertiesOnLegacyElementNotRenamed_inGoogModule() throw
761
761
" }," ,
762
762
"});" )));
763
763
764
- // TODO(b/218711238): investigate this crash
765
- assertThrows (NullPointerException .class , () -> compileTypedAstShards (options ));
766
- // Compiler compiler = compileTypedAstShards(options);
767
- // String source = compiler.toSource();
768
-
769
- // // If we see these identifiers anywhere in the output source, we know that we successfully
770
- // // protected them against removal and renaming.
771
- // assertThat(source).contains("longUnusedProperty");
772
- // assertThat(source).contains("longUnusedMethod");
764
+ Compiler compiler = compileTypedAstShards (options );
765
+ String source = compiler .toSource ();
766
+
767
+ // If we see these identifiers anywhere in the output source, we know that we successfully
768
+ // protected them against removal and renaming.
769
+ assertThat (source ).contains ("longUnusedProperty" );
770
+ assertThat (source ).contains ("longUnusedMethod" );
773
771
}
774
772
775
773
// use over 'compileTypedAstShards' if you want to validate reported errors or warnings in your
You can’t perform that action at this time.
0 commit comments