diff options
author | Tor Norbye <tnorbye@google.com> | 2014-07-16 18:07:37 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2014-07-16 18:09:03 -0700 |
commit | 65f60eb9011bb2c549a6d83ae31257480368ddc5 (patch) | |
tree | de0dca03bec460e8797332e5f460400f5cf6485f /plugins/structuralsearch/testSource/com/intellij/structuralsearch/SSBasedInspectionTest.java | |
parent | 9ea67227e8fdcf8ed37e65bb96e32767291d0f4f (diff) | |
download | idea-65f60eb9011bb2c549a6d83ae31257480368ddc5.tar.gz |
Snapshot idea/138.1029 from git://git.jetbrains.org/idea/community.git
Update from idea/138.538 to idea/138.1029
Change-Id: I828f829a968439a99ec67640990c18ff7c9b58ce
Diffstat (limited to 'plugins/structuralsearch/testSource/com/intellij/structuralsearch/SSBasedInspectionTest.java')
-rw-r--r-- | plugins/structuralsearch/testSource/com/intellij/structuralsearch/SSBasedInspectionTest.java | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/plugins/structuralsearch/testSource/com/intellij/structuralsearch/SSBasedInspectionTest.java b/plugins/structuralsearch/testSource/com/intellij/structuralsearch/SSBasedInspectionTest.java new file mode 100644 index 000000000000..7971c1009fbd --- /dev/null +++ b/plugins/structuralsearch/testSource/com/intellij/structuralsearch/SSBasedInspectionTest.java @@ -0,0 +1,47 @@ +package com.intellij.structuralsearch; + +import com.intellij.codeInspection.ex.LocalInspectionToolWrapper; +import com.intellij.openapi.application.PluginPathManager; +import com.intellij.structuralsearch.inspection.highlightTemplate.SSBasedInspection; +import com.intellij.structuralsearch.plugin.ui.Configuration; +import com.intellij.structuralsearch.plugin.ui.SearchConfiguration; +import com.intellij.testFramework.InspectionTestCase; + +import java.util.ArrayList; +import java.util.List; + +public class SSBasedInspectionTest extends InspectionTestCase { + private LocalInspectionToolWrapper myWrapper; + + @Override + protected void setUp() throws Exception { + super.setUp(); + SSBasedInspection inspection = new SSBasedInspection(); + List<Configuration> configurations = new ArrayList<Configuration>(); + SearchConfiguration configuration = new SearchConfiguration(); + MatchOptions options = new MatchOptions(); + options.setSearchPattern("int i;"); + configuration.setMatchOptions(options); + configurations.add(configuration); + configuration = new SearchConfiguration(); + options = new MatchOptions(); + options.setSearchPattern("f();"); + configuration.setMatchOptions(options); + configurations.add(configuration); + inspection.setConfigurations(configurations, myProject); + inspection.projectOpened(getProject()); + myWrapper = new LocalInspectionToolWrapper(inspection); + } + + public void testSimple() throws Exception { + doTest(); + } + + private void doTest() throws Exception { + doTest("ssBased/" + getTestName(true), myWrapper,"java 1.5"); + } + + protected String getTestDataPath() { + return PluginPathManager.getPluginHomePath("structuralsearch") + "/testData"; + } +} |