timing.swtbot: add SWTBot tests to timing analysis
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.timing.core.tests / src / org / eclipse / tracecompass / analysis / timing / core / tests / flamegraph / AggregationTreeTest.java
index 8d21b3198707d34a1ab652bd1de7cbb92f120ddc..4554c32158461d6bf8561ede1d0bb36ca225b45d 100644 (file)
@@ -80,6 +80,8 @@ public class AggregationTreeTest {
         return fixture;
     }
 
+    private CGAnalysis fCga;
+
     /**
      * Test an empty state system.
      */
@@ -125,6 +127,7 @@ public class AggregationTreeTest {
         fixture.closeHistory(1002);
         // Execute the CallGraphAnalysis
         CGAnalysis cga = new CGAnalysis();
+        setCga(cga);
         assertTrue(cga.iterateOverStateSystem(fixture, TP, PP, CSP, new NullProgressMonitor()));
         @NonNull
         List<ThreadNode> threads = cga.getThreadNodes();
@@ -201,8 +204,8 @@ public class AggregationTreeTest {
 
         // Execute the CallGraphAnalysis
         CGAnalysis cga = new CGAnalysis();
+        setCga(cga);
         assertTrue(cga.iterateOverStateSystem(fixture, TP, PP, CSP, new NullProgressMonitor()));
-        @NonNull
         List<ThreadNode> threads = cga.getThreadNodes();
         // Test the threads generated by the analysis
         assertNotNull(threads);
@@ -282,6 +285,7 @@ public class AggregationTreeTest {
         CGAnalysis cga = new CGAnalysis();
         String @NonNull [] tp = { "123" };
         assertTrue(cga.iterateOverStateSystem(fixture, tp, PP, CSP, new NullProgressMonitor()));
+        setCga(cga);
         List<ThreadNode> threads = cga.getThreadNodes();
         // Test the threads generated by the analysis
         assertNotNull(threads);
@@ -393,6 +397,7 @@ public class AggregationTreeTest {
         buildCallStack(fixture);
         // Execute the CallGraphAnalysis
         CGAnalysis cga = new CGAnalysis();
+        setCga(cga);
         assertTrue(cga.iterateOverStateSystem(fixture, TP, PP, CSP, new NullProgressMonitor()));
         List<ThreadNode> threads = cga.getThreadNodes();
         // Test the threads generated by the analysis
@@ -472,6 +477,7 @@ public class AggregationTreeTest {
         fixture.closeHistory(11);
         // Execute the callGraphAnalysis
         CGAnalysis cga = new CGAnalysis();
+        setCga(cga);
         assertTrue(cga.iterateOverStateSystem(fixture, TP, PP, CSP, new NullProgressMonitor()));
         List<ThreadNode> threads = cga.getThreadNodes();
         // Test the threads generated by the analysis
@@ -524,6 +530,7 @@ public class AggregationTreeTest {
 
         // Execute the callGraphAnalysis
         CGAnalysis cga = new CGAnalysis();
+        setCga(cga);
         assertTrue(cga.iterateOverStateSystem(fixture, TP, PP, CSP, new NullProgressMonitor()));
         List<ThreadNode> threads = cga.getThreadNodes();
         // Test the threads generated by the analysis
@@ -598,6 +605,7 @@ public class AggregationTreeTest {
 
         // Execute the callGraphAnalysis
         CGAnalysis cga = new CGAnalysis();
+        setCga(cga);
         assertTrue(cga.iterateOverStateSystem(fixture, TP, PP, CSP, new NullProgressMonitor()));
         List<ThreadNode> threads = cga.getThreadNodes();
         // Test the threads generated by the analysis
@@ -644,4 +652,16 @@ public class AggregationTreeTest {
         assertEquals("Test third function's number of calls", 1, function4.getNbCalls());
 
     }
+
+    /**
+     * Gets the call graph analysis
+     * @return the call graph analysis
+     */
+    protected CGAnalysis getCga() {
+        return fCga;
+    }
+
+    private void setCga(CGAnalysis cga) {
+        fCga = cga;
+    }
 }
This page took 0.024585 seconds and 5 git commands to generate.