Revert 924ce2c5ba4d1c1dc781a6a06682204d358421bb

Because test-unit didn't provide the benchmark test. And This test
  is fragile with the several environments.
This commit is contained in:
Hiroshi SHIBATA 2021-05-11 13:48:16 +09:00
Родитель bef49e6e8d
Коммит cdcfe1082c
1 изменённых файлов: 0 добавлений и 11 удалений

Просмотреть файл

@ -2,8 +2,6 @@
require 'rubygems/test_case' require 'rubygems/test_case'
require "rubygems/version" require "rubygems/version"
require "minitest/benchmark"
class TestGemVersion < Gem::TestCase class TestGemVersion < Gem::TestCase
class V < ::Gem::Version class V < ::Gem::Version
end end
@ -110,15 +108,6 @@ class TestGemVersion < Gem::TestCase
end end
end end
def bench_anchored_version_pattern
assert_performance_linear 0.5 do |count|
version_string = count.times.map {|i| "0" * i.succ }.join(".") << "."
version_string =~ Gem::Version::ANCHORED_VERSION_PATTERN
end
rescue RegexpError
skip "It fails to allocate the memory for regex pattern of Gem::Version::ANCHORED_VERSION_PATTERN"
end
def test_empty_version def test_empty_version
["", " ", " "].each do |empty| ["", " ", " "].each do |empty|
assert_equal "0", Gem::Version.new(empty).version assert_equal "0", Gem::Version.new(empty).version