Removed closure-compiler.jar from repository and js_test_libs.
Added closure-compiler.jar to third-party dependencies. Switch to use closure-compiler ant task instead of java task.
This commit is contained in:
@@ -16,8 +16,7 @@
|
||||
|
||||
package org.jetbrains.k2js.test.config;
|
||||
|
||||
import closurecompiler.internal.com.google.common.collect.Lists;
|
||||
import closurecompiler.internal.com.google.common.collect.Maps;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
@@ -32,11 +31,11 @@ import java.util.Map;
|
||||
public class JsUnitTestReporter {
|
||||
|
||||
@NotNull
|
||||
private final Map<String, Boolean> finishedTests = Maps.newHashMap();
|
||||
private final Map<String, Boolean> finishedTests = ContainerUtil.newHashMap();
|
||||
@NotNull
|
||||
private final Map<String, List<String>> errors = Maps.newHashMap();
|
||||
private final Map<String, List<String>> errors = ContainerUtil.newHashMap();
|
||||
@NotNull
|
||||
private final List<String> processedTests = Lists.newArrayList();
|
||||
private final List<String> processedTests = ContainerUtil.newArrayList();
|
||||
|
||||
@Nullable
|
||||
private String currentTestName;
|
||||
@@ -69,7 +68,7 @@ public class JsUnitTestReporter {
|
||||
public void reportError(@NotNull String message) {
|
||||
List<String> errorList = errors.get(currentTestName);
|
||||
if (errorList == null) {
|
||||
errors.put(currentTestName, Lists.newArrayList(message));
|
||||
errors.put(currentTestName, ContainerUtil.newArrayList(message));
|
||||
}
|
||||
else {
|
||||
errorList.add(message);
|
||||
@@ -78,7 +77,7 @@ public class JsUnitTestReporter {
|
||||
|
||||
@NotNull
|
||||
private Collection<String> getNewFinishedTests() {
|
||||
ArrayList<String> finishedTests = Lists.newArrayList(this.finishedTests.keySet());
|
||||
ArrayList<String> finishedTests = ContainerUtil.newArrayList(this.finishedTests.keySet());
|
||||
finishedTests.removeAll(processedTests);
|
||||
return finishedTests;
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
package org.jetbrains.k2js.test.rhino;
|
||||
|
||||
import closurecompiler.internal.com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.k2js.config.EcmaVersion;
|
||||
@@ -43,7 +43,7 @@ public final class RhinoUtils {
|
||||
private static final NativeObject JSHINT_OPTIONS = new NativeObject();
|
||||
|
||||
@NotNull
|
||||
private static final Map<EcmaVersion, ScriptableObject> versionToScope = Maps.newHashMap();
|
||||
private static final Map<EcmaVersion, ScriptableObject> versionToScope = ContainerUtil.newHashMap();
|
||||
|
||||
static {
|
||||
// don't read JS, use kotlin and idea debugger ;)
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import closurecompiler.internal.com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.k2js.config.EcmaVersion;
|
||||
import org.jetbrains.k2js.test.rhino.CompositeRhinoResultsChecker;
|
||||
import org.jetbrains.k2js.test.rhino.RhinoFunctionResultChecker;
|
||||
@@ -38,7 +38,7 @@ public class StdLibJsArrayScriptTest extends StdLibTestBase {
|
||||
|
||||
@Override
|
||||
protected void performChecksOnGeneratedJavaScript(String path, EcmaVersion version) throws Exception {
|
||||
Map<String, Object> variables = Maps.newHashMap();
|
||||
Map<String, Object> variables = ContainerUtil.newHashMap();
|
||||
String moduleId = moduleIdFromOutputFile(path);
|
||||
RhinoResultChecker checker = new CompositeRhinoResultsChecker(
|
||||
new RhinoFunctionResultChecker(moduleId, "jstest", "testSize", 3.0),
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
*/
|
||||
package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import closurecompiler.internal.com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.jetbrains.k2js.config.EcmaVersion;
|
||||
import org.jetbrains.k2js.test.rhino.RhinoQUnitResultChecker;
|
||||
import org.jetbrains.k2js.test.rhino.RhinoResultChecker;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.jetbrains.k2js.test.rhino.RhinoUtils.runRhinoTest;
|
||||
@@ -38,7 +38,7 @@ public abstract class StdLibQUnitTestSupport extends StdLibTestBase {
|
||||
}
|
||||
|
||||
protected void runQUnitTestCase(String path, EcmaVersion version) throws Exception {
|
||||
runQUnitTestCase(path, version, Maps.<String, Object>newHashMap());
|
||||
runQUnitTestCase(path, version, new HashMap<String, Object>());
|
||||
}
|
||||
|
||||
protected void runQUnitTestCase(String path, EcmaVersion version, Map<String, Object> variables) throws Exception {
|
||||
|
||||
@@ -19,9 +19,9 @@ package org.jetbrains.k2js.test.utils;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.k2js.config.Config;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public final class LibraryFilePathsUtil {
|
||||
|
||||
@@ -70,7 +70,7 @@ public final class TranslationUtils {
|
||||
List<JetFile> allLibFiles = getAllLibFiles(project);
|
||||
Predicate<PsiFile> filesWithCode = new Predicate<PsiFile>() {
|
||||
@Override
|
||||
public boolean apply(@javax.annotation.Nullable PsiFile file) {
|
||||
public boolean apply(@Nullable PsiFile file) {
|
||||
assert file != null;
|
||||
return isFileWithCode((JetFile) file);
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user