@@ -0,0 +1,2066 @@
+/*%0A * Copyright 2016 The Closure Compiler Authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.google.javascript.jscomp;%0A%0Aimport com.google.javascript.jscomp.CompilerOptions.J2clPassMode;%0Aimport com.google.javascript.jscomp.CompilerOptions.LanguageMode;%0A%0A%0Apublic final class J2clIntegrationTest extends IntegrationTestCase %7B%0A  public void testStripNoSideEffectsClinit() %7B%0A    String source =%0A        LINE_JOINER.join(%0A            %22class Preconditions %7B%22,%0A            %22  static clinit() %7B%22,%0A            %22    Preconditions.clinit = function() %7B%7D;%22,%0A            %22  %7D%22,%0A            %22  static checkNotNull(obj) %7B%22,%0A            %22    Preconditions.clinit();%22,%0A            %22    return obj;%22,%0A            %22  %7D%22,%0A            %22%7D%22,%0A            %22class Main %7B%22,%0A            %22  static main() %7B%22,%0A            %22    var a = Preconditions.checkNotNull(null);%22,%0A            %22    alert('hello!');%22,%0A            %22  %7D%22,%0A            %22%7D%22,%0A            %22Main.main();%22);%0A    // TODO(tdeegan): Change to just %22alert('hello') when we can determine clinit() is%0A    // pure and can be stripped.%0A    test(createCompilerOptions(), source, %22function a()%7Ba=function()%7B%7D%7Da();alert('hello!')%22);%0A  %7D%0A%0A  @Override%0A  CompilerOptions createCompilerOptions() %7B%0A    CompilerOptions options = new CompilerOptions();%0A    CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel(options);%0A    options.setLanguageIn(LanguageMode.ECMASCRIPT6_TYPED);%0A    options.setLanguageOut(LanguageMode.ECMASCRIPT5);%0A    options.setJ2clPass(J2clPassMode.ON);%0A    return options;%0A  %7D%0A%7D%0A

Add example for unstripped method because of computed side effects.