file structure filtering tests

This commit is contained in:
Konstantin Bulenkov
2012-02-02 09:22:19 +01:00
parent 6b25628673
commit 926f96e44b
14 changed files with 246 additions and 132 deletions
@@ -0,0 +1,8 @@
import java.awt.*;
class AnonymousType<caret> {
int num;
void foo() {
new java.awt.Point(){};
}
}
@@ -0,0 +1,4 @@
-AnonymousType.java
-AnonymousType
-foo():void
[$1]
@@ -0,0 +1,7 @@
class Camel<caret> {
void doSomething(){}
void doSomethingWith(){}
void doSomethingWithMyHead(){}
void getSomeHead(){}
void getSomeArtHeader(){}
}
@@ -0,0 +1,3 @@
-Camel.java
-Camel
[getSomeHead():void]
@@ -0,0 +1,7 @@
class Camel2<caret> {
void doSomething(){}
void doSomethingWith(){}
void doSomethingWithMyHead(){}
void doSomeHead(){}
void doSomeArtHeader(){}
}
@@ -0,0 +1,5 @@
-Camel2.java
-Camel2
doSomeArtHeader():void
[doSomeHead():void]
doSomethingWithMyHead():void
@@ -0,0 +1,10 @@
import java.awt.*;
class ReturnValue {
void aaa(){<caret>}
Point getLocationOnScreen(){}
Point getPoint(){}
void fff2(){}
void fff3(){}
void fff4(){}
}
@@ -0,0 +1,4 @@
-ReturnValue.java
-ReturnValue
getLocationOnScreen():Point
[getPoint():Point]
@@ -0,0 +1,8 @@
class Simple<caret> {
void aaa(){}
void bbb(){}
void fff(){}
void fff2(){}
void fff3(){}
void fff4(){}
}
@@ -0,0 +1,6 @@
-Simple.java
-Simple
[fff():void]
fff2():void
fff3():void
fff4():void
@@ -0,0 +1,33 @@
/*
* Copyright 2000-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 com.intellij.ide.fileStructure;
/**
* @author Konstantin Bulenkov
*/
public class JavaFileStructureFilteringTest extends JavaFileStructureTestCase {
@Override
protected String getTestDataFolderName() {
return "filtering";
}
public void testSimple()throws Exception{checkTree("f");}
public void testReturnValue()throws Exception{checkTree("point");}
public void testAnonymousType()throws Exception{checkTree("point");}
public void testCamel()throws Exception{checkTree("sohe");}
public void testCamel2()throws Exception{checkTree("soHe");}
}
@@ -20,6 +20,7 @@ import com.intellij.ide.structureView.impl.java.JavaAnonymousClassesNodeProvider
import com.intellij.ide.util.FileStructurePopup;
import com.intellij.ide.util.PropertiesComponent;
import com.intellij.testFramework.FileStructureTestBase;
import com.intellij.testFramework.IdeaTestCase;
/**
* @author Konstantin Bulenkov
@@ -27,6 +28,10 @@ import com.intellij.testFramework.FileStructureTestBase;
public abstract class JavaFileStructureTestCase extends FileStructureTestBase {
private boolean myShowAnonymousByDefault;
protected JavaFileStructureTestCase() {
IdeaTestCase.initPlatformPrefix();
}
protected abstract String getTestDataFolderName();
@Override