[mono/monodevelop] 6abc8da9: [Test Results] Fix lots of assertion fails where fraction is not in [0, 1].

"Therzok ([email protected])" <[email protected]>
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <00000141e9e8c578-fa26ab05-b913-4614-b3a5-438099067e44-000000@email.amazonses.com>
   Branch: refs/heads/testResultsPad
     Home: https://github.com/mono/monodevelop
  Compare: https://github.com/mono/monodevelop/commit/6abc8da9d215

   Commit: 6abc8da9d2153952b6b162dcf8256f2865fee239
   Author: Therzok <[email protected]> (Therzok)
     Date: 2013-10-24 09:59:29 GMT
      URL: https://github.com/mono/monodevelop/commit/6abc8da9d2153952b6b162dcf8256f2865fee239

[Test Results] Fix lots of assertion fails where fraction is not in [0, 1].

Maybe there is a better fix?

Changed paths:
  M main/src/addins/NUnit/Gui/TestResultsPad.cs

Modified: main/src/addins/NUnit/Gui/TestResultsPad.cs
===================================================================
@@ -667,6 +667,12 @@ void ITestProgressMonitor.EndTest (UnitTest test, UnitTestResult result)
 				frac = ((double)testsRun / (double)testsToRun);
 			else
 				frac = 1;
+
+			if (frac < 0)
+				frac = 0;
+			else if (frac > 1)
+				frac = 1;
+
 			progressBar.Fraction = frac;
 			progressBar.Text = testsRun + " / " + testsToRun;
 		}


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.