[Groonga-commit] groonga/grntest [master] Fix invalid pass ratio computation on all tests are not checked tests case

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Aug 11 21:28:06 JST 2012


Kouhei Sutou	2012-08-11 21:28:06 +0900 (Sat, 11 Aug 2012)

  New Revision: a48d3403d33a731082fb5d1e0ab8c23bac39ea3d
  https://github.com/groonga/grntest/commit/a48d3403d33a731082fb5d1e0ab8c23bac39ea3d

  Log:
    Fix invalid pass ratio computation on all tests are not checked tests case

  Modified files:
    lib/grntest/tester.rb

  Modified: lib/grntest/tester.rb (+3 -2)
===================================================================
--- lib/grntest/tester.rb    2012-08-11 21:19:58 +0900 (045f56a)
+++ lib/grntest/tester.rb    2012-08-11 21:28:06 +0900 (929a4b2)
@@ -492,10 +492,11 @@ module Grntest
       end
 
       def pass_ratio
-        if n_tests.zero?
+        n_target_tests = n_tests - n_not_checked_tests
+        if n_target_tests.zero?
           0
         else
-          (n_passed_tests / (n_tests - n_not_checked_tests).to_f) * 100
+          (n_passed_tests / n_target_tests.to_f) * 100
         end
       end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index