diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-17 15:53:18 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-18 02:41:02 +0900 |
commit | ccd2dbc4c15ffb5bde0141a98ec02603c1597243 (patch) | |
tree | e4d180ba3ccf4c1c04e0e9cb0f0c2f5abda5bd70 /test/ruby/test_regexp.rb | |
parent | 10e4fa3a0f05f72733d132794cedd08906b40196 (diff) | |
download | ruby-ccd2dbc4c15ffb5bde0141a98ec02603c1597243.tar.gz |
core_assertions.rb: Relax `assert_linear_performance`
* Use an `Enumerable` as factors, instead of three arguments.
* Include `assert_operator` time in rehearsal time.
* Round up max expected time.
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r-- | test/ruby/test_regexp.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index a2997af106..81dac20648 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1783,7 +1783,7 @@ class TestRegexp < Test::Unit::TestCase def test_linear_performance pre = ->(n) {[Regexp.new("a?" * n + "a" * n), "a" * n]} - assert_linear_performance(factor: 29, first: 10, max: 1, pre: pre) do |re, s| + assert_linear_performance([10, 29], pre: pre) do |re, s| re =~ s end end |