Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/gcov
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-06-15 10:24:32 +0000
committerAlexander Kurtakov2012-06-15 10:25:52 +0000
commit49d387203a68cd1a8dd2f57d565ee6b11004971f (patch)
treecdc093cbd81bfe23369bc518a174112c54dca8d6 /gcov
parentfcd3b789a0691b8062ca0aeae678fa1fe1e2ce2b (diff)
downloadorg.eclipse.linuxtools-49d387203a68cd1a8dd2f57d565ee6b11004971f.tar.gz
org.eclipse.linuxtools-49d387203a68cd1a8dd2f57d565ee6b11004971f.tar.xz
org.eclipse.linuxtools-49d387203a68cd1a8dd2f57d565ee6b11004971f.zip
Simplify the tests.
Instead of declaring a suite and internal static classes each of them using swtbot launcher just make them methods and run with the swtbot launcher directly.
Diffstat (limited to 'gcov')
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java38
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java36
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java37
3 files changed, 19 insertions, 92 deletions
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java
index 0a67f6e627..aebe7d0295 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestC.java
@@ -9,16 +9,8 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- org.eclipse.linuxtools.internal.gcov.test.GcovTestC.CreateProject.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestC.PopulateProject.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestC.CompileProject.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestC.OpenGcovFileDetails.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestC.OpenGcovSummary.class
-})
+@RunWith(SWTBotJunit4ClassRunner.class)
public class GcovTestC {
@@ -38,7 +30,7 @@ public class GcovTestC {
bot.shell("Subclipse Usage").activate();
bot.button("Cancel").click();
} catch (WidgetNotFoundException e) {
- // ignore
+ //ignore
}
bot.perspectiveByLabel("C/C++").activate();
@@ -65,45 +57,29 @@ public class GcovTestC {
bot.button("OK").click();
}
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class CreateProject {
@Test
- public void test() {
+ public void createProject() {
System.out.println("Test: " + getClass().getName());
GcovTest.createProject(bot, PROJECT_NAME, PROJECT_TYPE);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class PopulateProject {
@Test
- public void test() throws Exception {
+ public void populateProject() throws Exception {
GcovTest.populateProject(bot, PROJECT_NAME);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class CompileProject {
@Test
- public void test() throws Exception {
+ public void compileProject() throws Exception {
GcovTest.compileProject(bot, PROJECT_NAME);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class OpenGcovFileDetails {
@Test
- public void test() throws Exception {
+ public void openGcovFileDetails() throws Exception {
GcovTest.openGcovFileDetails(bot, PROJECT_NAME);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class OpenGcovSummary {
@Test
- public void test() throws Exception {
+ public void openGcovSummary() throws Exception {
GcovTest.openGcovSummary(bot, PROJECT_NAME, true);
}
- }
-
}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java
index 34497fa764..d001a70232 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCLibrary.java
@@ -9,16 +9,8 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- org.eclipse.linuxtools.internal.gcov.test.GcovTestCLibrary.CreateProject.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestCLibrary.PopulateProject.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestCLibrary.CompileProject.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestCLibrary.OpenGcovFileDetails.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestCLibrary.OpenGcovSummary.class
-})
+@RunWith(SWTBotJunit4ClassRunner.class)
public class GcovTestCLibrary {
@@ -66,45 +58,29 @@ public class GcovTestCLibrary {
bot.button("OK").click();
}
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class CreateProject {
@Test
- public void test() {
+ public void createProject() {
GcovTest.createProject(bot, PROJECT_NAME, PROJECT_TYPE);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class PopulateProject {
@Test
- public void test() throws Exception {
+ public void populateProject() throws Exception {
GcovTest.populateProject(bot, PROJECT_NAME);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class CompileProject {
@Test
- public void test() throws Exception {
+ public void compileProject() throws Exception {
GcovTest.compileProject(bot, PROJECT_NAME);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class OpenGcovFileDetails {
@Test
- public void test() throws Exception {
+ public void openGcovFileDetails() throws Exception {
GcovTest.openGcovFileDetails(bot, PROJECT_NAME, BIN_NAME);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class OpenGcovSummary {
@Test
- public void test() throws Exception {
+ public void openGcovSummary() throws Exception {
GcovTest.openGcovSummary(bot, PROJECT_NAME, BIN_NAME, true);
}
- }
-
}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java
index 7e364153a5..878851398d 100644
--- a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/internal/gcov/test/GcovTestCPP.java
@@ -9,16 +9,8 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- org.eclipse.linuxtools.internal.gcov.test.GcovTestCPP.CreateProject.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestCPP.PopulateProject.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestCPP.CompileProject.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestCPP.OpenGcovFileDetails.class,
- org.eclipse.linuxtools.internal.gcov.test.GcovTestCPP.OpenGcovSummary.class
-})
+@RunWith(SWTBotJunit4ClassRunner.class)
public class GcovTestCPP {
@@ -65,45 +57,28 @@ public class GcovTestCPP {
bot.button("OK").click();
}
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class CreateProject {
@Test
- public void test() {
+ public void createProject() {
GcovTest.createProject(bot, PROJECT_NAME, PROJECT_TYPE);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class PopulateProject {
@Test
- public void test() throws Exception {
+ public void populateProject() throws Exception {
GcovTest.populateProject(bot, PROJECT_NAME);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class CompileProject {
@Test
- public void test() throws Exception {
+ public void cmpileProject() throws Exception {
GcovTest.compileProject(bot, PROJECT_NAME);
}
- }
-
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class OpenGcovFileDetails {
@Test
- public void test() throws Exception {
+ public void openGcovFileDetails() throws Exception {
GcovTest.openGcovFileDetails(bot, PROJECT_NAME);
}
- }
- @RunWith(SWTBotJunit4ClassRunner.class)
- public static class OpenGcovSummary {
@Test
- public void test() throws Exception {
+ public void openGcovSummary() throws Exception {
GcovTest.openGcovSummary(bot, PROJECT_NAME, false);
}
- }
-
}

Back to the top