JetOverridingTest -> JetLiteFixture
This commit is contained in:
@@ -32,6 +32,10 @@ public abstract class JetLiteFixture extends UsefulTestCase {
|
|||||||
myFullDataPath = getTestDataPath() + "/" + dataPath;
|
myFullDataPath = getTestDataPath() + "/" + dataPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JetLiteFixture() {
|
||||||
|
myFullDataPath = getTestDataPath();
|
||||||
|
}
|
||||||
|
|
||||||
protected String getTestDataPath() {
|
protected String getTestDataPath() {
|
||||||
return JetTestCaseBase.getTestDataPathBase();
|
return JetTestCaseBase.getTestDataPathBase();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.jetbrains.jet.types;
|
package org.jetbrains.jet.types;
|
||||||
|
|
||||||
import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase;
|
import org.jetbrains.jet.JetLiteFixture;
|
||||||
import com.intellij.openapi.application.PathManager;
|
import org.jetbrains.jet.JetTestCaseBase;
|
||||||
import org.jetbrains.jet.JetTestUtils;
|
import org.jetbrains.jet.JetTestUtils;
|
||||||
import org.jetbrains.jet.lang.JetSemanticServices;
|
import org.jetbrains.jet.lang.JetSemanticServices;
|
||||||
import org.jetbrains.jet.lang.descriptors.FunctionDescriptor;
|
import org.jetbrains.jet.lang.descriptors.FunctionDescriptor;
|
||||||
@@ -11,14 +11,11 @@ import org.jetbrains.jet.lang.psi.JetPsiFactory;
|
|||||||
import org.jetbrains.jet.lang.resolve.ClassDescriptorResolver;
|
import org.jetbrains.jet.lang.resolve.ClassDescriptorResolver;
|
||||||
import org.jetbrains.jet.lang.resolve.OverridingUtil;
|
import org.jetbrains.jet.lang.resolve.OverridingUtil;
|
||||||
import org.jetbrains.jet.lang.types.JetStandardLibrary;
|
import org.jetbrains.jet.lang.types.JetStandardLibrary;
|
||||||
import org.jetbrains.jet.parsing.JetParsingTest;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author abreslav
|
* @author abreslav
|
||||||
*/
|
*/
|
||||||
public class JetOverridingTest extends LightDaemonAnalyzerTestCase {
|
public class JetOverridingTest extends JetLiteFixture {
|
||||||
|
|
||||||
private ModuleDescriptor root = new ModuleDescriptor("test_root");
|
private ModuleDescriptor root = new ModuleDescriptor("test_root");
|
||||||
private JetStandardLibrary library;
|
private JetStandardLibrary library;
|
||||||
@@ -35,11 +32,7 @@ public class JetOverridingTest extends LightDaemonAnalyzerTestCase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getTestDataPath() {
|
protected String getTestDataPath() {
|
||||||
return getHomeDirectory() + "/compiler/testData";
|
return JetTestCaseBase.getTestDataPathBase();
|
||||||
}
|
|
||||||
|
|
||||||
private static String getHomeDirectory() {
|
|
||||||
return new File(PathManager.getResourceRoot(JetParsingTest.class, "/org/jetbrains/jet/parsing/JetParsingTest.class")).getParentFile().getParentFile().getParent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBasic() throws Exception {
|
public void testBasic() throws Exception {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package org.jetbrains.jet.types;
|
package org.jetbrains.jet.types;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.intellij.openapi.application.PathManager;
|
|
||||||
import com.intellij.openapi.project.Project;
|
import com.intellij.openapi.project.Project;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.JetLiteFixture;
|
import org.jetbrains.jet.JetLiteFixture;
|
||||||
|
import org.jetbrains.jet.JetTestCaseBase;
|
||||||
import org.jetbrains.jet.JetTestUtils;
|
import org.jetbrains.jet.JetTestUtils;
|
||||||
import org.jetbrains.jet.lang.JetSemanticServices;
|
import org.jetbrains.jet.lang.JetSemanticServices;
|
||||||
import org.jetbrains.jet.lang.descriptors.*;
|
import org.jetbrains.jet.lang.descriptors.*;
|
||||||
@@ -19,9 +19,7 @@ import org.jetbrains.jet.lang.resolve.scopes.receivers.ExpressionReceiver;
|
|||||||
import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor;
|
import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverDescriptor;
|
||||||
import org.jetbrains.jet.lang.types.*;
|
import org.jetbrains.jet.lang.types.*;
|
||||||
import org.jetbrains.jet.lexer.JetTokens;
|
import org.jetbrains.jet.lexer.JetTokens;
|
||||||
import org.jetbrains.jet.parsing.JetParsingTest;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -53,11 +51,7 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getTestDataPath() {
|
protected String getTestDataPath() {
|
||||||
return getHomeDirectory() + "/compiler/testData";
|
return JetTestCaseBase.getTestDataPathBase();
|
||||||
}
|
|
||||||
|
|
||||||
private static String getHomeDirectory() {
|
|
||||||
return new File(PathManager.getResourceRoot(JetParsingTest.class, "/org/jetbrains/jet/parsing/JetParsingTest.class")).getParentFile().getParentFile().getParent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testConstants() throws Exception {
|
public void testConstants() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user