test data for position manager
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
annotation class A {
|
||||
fun foo() {
|
||||
"" // A
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
fun foo() {
|
||||
{
|
||||
"" // A$foo$1
|
||||
}()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
val x = go() // A
|
||||
|
||||
fun go() = 4 // A
|
||||
|
||||
fun foo() {
|
||||
"" // A
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
class object {
|
||||
fun foo() {
|
||||
"" // A$ClassObject$
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
enum class E {
|
||||
fun foo() {
|
||||
"" // E
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package a
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
fun A.foo() {
|
||||
"" // a/namespace
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
class B {
|
||||
fun foo() {
|
||||
"" // A$B
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package test
|
||||
|
||||
fun foo(): String {
|
||||
fun bar(): String {
|
||||
return "" // test/namespace$foo$1
|
||||
}
|
||||
return bar()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
"" // namespace
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun foo() {
|
||||
"" // test/namespace
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
object Obj {
|
||||
val x = foo() // Obj
|
||||
|
||||
fun foo(): Int {
|
||||
return 0 // Obj
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
fun foo() {
|
||||
object {
|
||||
fun bar() {
|
||||
"" // A$foo$1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class A {
|
||||
val foo: Int
|
||||
get() = 5 // A
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
trait A {
|
||||
fun foo() {
|
||||
"" // A$$TImpl
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright 2010-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.plugin.debugger;
|
||||
|
||||
import com.intellij.debugger.PositionManagerFactory;
|
||||
import org.jetbrains.jet.plugin.PluginTestCaseBase;
|
||||
|
||||
/**
|
||||
* @author udalov
|
||||
*/
|
||||
public class JetPositionManagerTest extends PositionManagerTestCase {
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return PluginTestCaseBase.getTestDataPathBase() + "/debugger";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PositionManagerFactory getPositionManagerFactory() {
|
||||
return new JetPositionManagerFactory();
|
||||
}
|
||||
|
||||
public void testAnnotation() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAnonymousFunction() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testClass() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testClassObject() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testEnum() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testExtensionFunction() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testInnerClass() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testLocalFunction() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNamespace() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNamespaceOfPackage() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testObjectDeclaration() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testObjectExpression() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testPropertyAccessor() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testTrait() {
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user