This change improves line coverage of prime.rb from 86% to 99%.
A patch from @shio-phys. https://github.com/ruby/prime/pull/3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/prime.rb: Use accurate sqrt to insure all factors are tested.
Patch by Marcus Stollsteimer.
* test/test_prime.rb: Adapt test for timeout
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Adapted from patch by Jabari Zakiya [#12665]
* test/test_prime.rb: Improve test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/test_prime.rb (test_eratosthenes_works_fine_after_timeout):
use assert_raise to check timeout.
* test/test_securerandom.rb: check if results are hexadecimal
strings, and refine failure messages.
* test/test_tracer.rb (test_tracer_with_option_r_without_gems):
use assert_equal to compare.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/test_prime.rb: use more descriptive assertions for better
failure meessages, instead of simple assert.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
by definition. reported by Ivan Kataitsev. [Bug #7395]
* test/test_prime.rb: add test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
not been displayed when $VERBOSE == nil. Patch by Shota Fukumori
a.k.a. sora_h. [ruby-dev:42272]
Recovers $stderr even if StringIO.new fails. Reported by unak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
negative integer into a decomposition with element [-1, 1].
* test/test_prime.rb: test for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-core:22646].
* test/test_prime.rb (test_prime?): test case for [ruby-core:22646].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e