[Groonga-commit] groonga/groonga-test [master] Fix success ratio format

Back to archive index

null+****@clear***** null+****@clear*****
2012年 3月 5日 (月) 18:28:02 JST


Kouhei Sutou	2012-03-05 18:28:02 +0900 (Mon, 05 Mar 2012)

  New Revision: c477352222986e7d048463157852d7acd5bb6a1e

  Log:
    Fix success ratio format

  Modified files:
    bin/groonga-test

  Modified: bin/groonga-test (+2 -2)
===================================================================
--- bin/groonga-test    2012-03-05 18:27:43 +0900 (d7c30e5)
+++ bin/groonga-test    2012-03-05 18:28:02 +0900 (dbbe7aa)
@@ -402,9 +402,9 @@ class GroongaTester
       if @n_tests.zero?
         pass_ratio = 0
       else
-        pass_ratio = @n_passed_tests / @n_tests.to_f
+        pass_ratio = (@n_passed_tests / @n_tests.to_f) * 100
       end
-      puts("%.2g%% passed." % pass_ratio)
+      puts("%.4g%% passed." % pass_ratio)
     end
 
     private




Groonga-commit メーリングリストの案内
Back to archive index