diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-09-22 10:42:26 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-09-22 10:42:26 +0400 |
commit | 6363d3f1ebcbec6652a866332d58d29fcb5ce56c (patch) | |
tree | 5cfbfe156251c498e4c95c612577cd4279919216 /main/src/addins/NUnit | |
parent | 8e94fcbef0858f61ed8c920fe5b2bf967d9d8932 (diff) |
Fixed 'Bug 385 - Test hierarchies are not colored correctly during
testing'.
Diffstat (limited to 'main/src/addins/NUnit')
-rw-r--r-- | main/src/addins/NUnit/Services/ExternalTestRunner.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/main/src/addins/NUnit/Services/ExternalTestRunner.cs b/main/src/addins/NUnit/Services/ExternalTestRunner.cs index a737b2de4d..658d02866e 100644 --- a/main/src/addins/NUnit/Services/ExternalTestRunner.cs +++ b/main/src/addins/NUnit/Services/ExternalTestRunner.cs @@ -118,13 +118,13 @@ namespace MonoDevelop.NUnit.External public void SuiteFinished (TestSuiteResult result) { - testSuites.Pop (); +// testSuites.Pop (); wrapped.SuiteFinished (GetTestName (result.Test), GetLocalTestResult (result)); } - Stack<string> testSuites = new Stack<string>(); +// Stack<string> testSuites = new Stack<string>(); public void SuiteStarted (TestName suite) { - testSuites.Push (suite.FullName); +// testSuites.Push (suite.FullName); wrapped.SuiteStarted (GetTestName (suite)); } @@ -161,13 +161,10 @@ namespace MonoDevelop.NUnit.External { if (t == null) return null; - // Theoretically t.TestName.FullName should work, but when a test class inherits from a base - // class that contains tests the full name is that one of the base class, which is wrong. - // I suspect that is a NUnit bug, when this is fixed this code should be overworked and the testSuites stack be removed. - // see: Bug 677228 - RemotingException isn't counted as failure - if (t.TestType != "Test Case" || testSuites.Count == 0) +// if (t.TestType != "Test Case" || testSuites.Count == 0) return t.TestName.FullName; - return testSuites.Peek () + "." + t.TestName.Name; + +// return testSuites.Peek () + "." + t.TestName.Name; } public string GetTestName (TestName t) @@ -359,13 +356,16 @@ namespace MonoDevelop.NUnit.External UnitTest GetLocalTest (string sname) { - if (sname == null) return null; - if (sname == "<root>") return rootTest; + if (sname == null) + return null; + if (sname == "<root>") + return rootTest; if (sname.StartsWith (rootFullName)) { sname = sname.Substring (rootFullName.Length); } - if (sname.StartsWith (".")) sname = sname.Substring (1); + if (sname.StartsWith (".")) + sname = sname.Substring (1); UnitTest tt = FindTest (rootTest, sname); return tt; } |