Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ward <matt.ward@xamarin.com>2015-07-29 13:13:04 +0300
committerMatt Ward <matt.ward@xamarin.com>2015-07-29 13:18:17 +0300
commit8db6c53beeb7c6b29a322df59d6d31b2eb6aa3ff (patch)
treee369f1e68ba18aaf7cc667dba53f22f2305ed506 /main/src/addins/NUnit
parent22bf4d22800016a5e8ac4033fb3a31e7b6b236fe (diff)
[NUnit] Do not clear test results when active config changed.
Fixed bug #31272 - Test results disappear randomly after running a test. https://bugzilla.xamarin.com/show_bug.cgi?id=31272 Only clear the results in the Test Results window when a workspace item is closed or a new test run is started. Previously the Test Results window would be cleared when the active configuration changed. The active configuration can be changed manually or if the SolutionItem's OnExecutionTargetsChanged method is called and the project does not use Debug as its default target. The Unit Tests window is still refreshed when the active configuration is changed.
Diffstat (limited to 'main/src/addins/NUnit')
-rw-r--r--main/src/addins/NUnit/Gui/TestResultsPad.cs24
1 files changed, 17 insertions, 7 deletions
diff --git a/main/src/addins/NUnit/Gui/TestResultsPad.cs b/main/src/addins/NUnit/Gui/TestResultsPad.cs
index fc1c178df9..7758886781 100644
--- a/main/src/addins/NUnit/Gui/TestResultsPad.cs
+++ b/main/src/addins/NUnit/Gui/TestResultsPad.cs
@@ -105,6 +105,7 @@ namespace MonoDevelop.NUnit
public TestResultsPad ()
{
testService.TestSuiteChanged += new EventHandler (OnTestSuiteChanged);
+ IdeApp.Workspace.WorkspaceItemClosed += OnWorkspaceItemClosed;
panel = new VBox ();
@@ -259,14 +260,28 @@ namespace MonoDevelop.NUnit
public void OnTestSuiteChanged (object sender, EventArgs e)
{
+ if (rootTest != null) {
+ rootTest = testService.SearchTest (rootTest.FullName);
+ if (rootTest == null)
+ buttonRun.Sensitive = false;
+ }
+ }
+
+ void OnWorkspaceItemClosed (object sender, EventArgs e)
+ {
+ ClearResults ();
+ }
+
+ void ClearResults ()
+ {
if (failuresTreeView.IsRealized)
failuresTreeView.ScrollToPoint (0, 0);
results.Clear ();
-
+
error = null;
errorMessage = null;
-
+
failuresStore.Clear ();
outputView.Buffer.Clear ();
outIters.Clear ();
@@ -276,11 +291,6 @@ namespace MonoDevelop.NUnit
resultSummary = new UnitTestResult ();
resultLabel.Markup = GetResultsMarkup ();
UpdateCounters ();
- if (rootTest != null) {
- rootTest = testService.SearchTest (rootTest.FullName);
- if (rootTest == null)
- buttonRun.Sensitive = false;
- }
}
bool Running {