51 Commits
Author SHA1 Message Date
Nobuyoshi NakadaandHiroshi SHIBATA 3563a0db80 Add predicates for platforms 2025-12-15 17:38:38 +09:00
Takashi Kokubun c69d59e9b2 Sync tool/lib/core_assertions.rb from master
It seems necessary to pass test-bundled-gems with REXML.
2024-09-02 03:25:23 -07:00
Hiroshi SHIBATA bb849ffdb1 Added explicitly begin-end block for Ruby 2.4.
strscan, ipaddr and some default gems still support Ruby 2.4.

  After this, I extract this CoreAssertions to their repositories.
2023-10-20 14:34:08 +09:00
Hiroshi SHIBATA f1c78b2331 Suppress warning for shadowing outer local variable 2023-09-12 15:10:16 +09:00
Hiroshi SHIBATA 141102b0b0 Expose Test.filter_backtrace for the default gems. 2023-08-29 15:05:30 +09:00
Nobuyoshi Nakada d239643603 core_assertions.rb: Support old rubies
Some symbol argument might not be accepted by Process.clock_gettime.
2023-04-29 11:28:26 +09:00
Nobuyoshi Nakada 533423ebe4 core_assertions.rb: Prefer CPU time clocks
To prevent influence from other processes.
2023-04-06 00:19:03 +09:00
Nobuyoshi Nakada f9eb2515a3 core_assertions.rb: Extract common code block 2023-04-06 00:19:03 +09:00
Nobuyoshi Nakada f07c756494 core_assertions.rb: Tweak timeout limit
Increase the timeout limit when variance at rehearsal is small.
2023-04-06 00:19:03 +09:00
Takashi Kokubun 3fe134759c Skip assert_linear_performance for RJIT 2023-04-02 12:23:23 -07:00
Nobuyoshi Nakada db7c38634e core_assertions.rb: Raise Timeout::Error explicitly
So that `assert_raise` inside the block works.
2023-03-23 14:49:41 +09:00
Nobuyoshi Nakada e340eb2106 core_assertions.rb: Fix backward compatibility with pre 2.7 2023-03-22 23:07:26 +09:00
Nobuyoshi Nakada 27916db08c [DOC] Update comment of assert_pattern_list
`pattern_list` may contain string since d903e76726.
2023-03-22 22:35:58 +09:00
Nobuyoshi Nakada 09bda4ceb5 core_assertions.rb: Refine assert_linear_performance
* Calculate each timeout from the ratio of each factor to the first
  factor.
2023-03-22 18:53:12 +09:00
Nobuyoshi Nakada ccd2dbc4c1 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.
2023-03-18 02:41:02 +09:00
Takashi Kokubun a8e7fee801 Revert "core_assertions.rb: Refine assert_linear_performance"
This reverts commit cae4342dd5.

This is failing a lot of CIs and nobody is actively looking into fixing
it. Let me revert this until we have a solution to it.
2023-03-16 09:22:42 -07:00
Nobuyoshi Nakada cae4342dd5 core_assertions.rb: Refine assert_linear_performance
* Use an `Enumerable` as factors, instead of three arguments.
2023-03-16 18:51:02 +09:00
Nobuyoshi Nakada 09041a6ee8 core_assertions.rb: Refine assert_linear_performance
* Add `rehearsal` keyword argument
* Stop repeating with the same factor
2023-03-15 18:19:31 +09:00
Nobuyoshi Nakada 7ce4b716bd Add test for linear performance 2023-03-12 18:50:39 +09:00
Nobuyoshi Nakada 781222a8bc core_assertions.rb: Consider backward compatibilities
This file is copied to default gems, which might support older
versions.
2023-03-12 18:40:41 +09:00
Takashi Kokubun 2e875549a9 s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
Hiroshi SHIBATA b496578758 Skip Test::Unit::AutoRunner logic in ruby/ruby repository 2023-01-05 08:16:24 +09:00
Hiroshi SHIBATA 1f2fef1f9a [ruby/openssl] Stop AutoRunner with test-unit
https://github.com/ruby/openssl/commit/0d4cd8b9ca
2023-01-05 08:06:49 +09:00
Hiroshi SHIBATA f229b36087 Fix test fail with assert_ractor outside of ruby/ruby repo
Revert 806583c093
2022-09-01 16:15:51 +09:00
Nobuyoshi Nakada d903e76726 Allow strings in assert_pattern_list 2022-08-19 01:28:31 +09:00
Nobuyoshi Nakada f159bbd17d Prevent accidental use of assert_raises 2022-06-25 19:09:06 +09:00
Nobuyoshi Nakadaandgit 8780f15fd7 [ruby/date] Use assert_deprecated_warn
https://github.com/ruby/date/commit/c55004715a
2022-02-25 20:39:47 +09:00
Jesse Chavezandgit 99d02caed3 [ruby/logger] Fix log rotation inter-process lock failed.
Issue only occurs in JRuby 9.3.0.0 and Windows and the full
console output is:

log rotation inter-process lock failed. D:\log.txt -> D:\log.txt.0: The process cannot access the file because it is being used by another process.
log writing failed. closed stream
log writing failed. closed stream
...

https://github.com/ruby/logger/commit/19fc734638
2022-01-27 12:33:06 +09:00
David RodríguezandHiroshi SHIBATA de678cd51e [ruby/pathname] Officially drop support for ruby 2.6 or older
The gem doesn't even install on old rubies, but since the gemspec claims
it's supported, `gem install pathname` will try to install it and print
an error.

This commit doesn't fix the above issue. The only way to fix it would be
to restore support and release a new version that actually supports old
rubies. However, such a change has been proposed and ignored for a long
time.

So this issue proposes to leave that broken but at least bring the
gemspec manifest and the CI matrix in sync to hopefully avoid this issue
from happening again in the future.

https://github.com/ruby/pathname/commit/3ee010b538
2022-01-25 08:50:31 +09:00
Takashi KokubunandGitHub 1a63468831 Prepare for removing RubyVM::JIT (#5262) 2021-12-13 23:07:46 -08:00
Nobuyoshi Nakada 438220f063 Let pretty_inspect work once at first
For older pp.rb which did not need io/console, and dealing with
`LoadError`.
2021-11-30 14:16:33 +09:00
Nobuyoshi Nakada d400c44a55 Load io/console earlier
Something goes wrong at loading libraries inside `mu_pp` in the
test overriding `Class.inherited`.
2021-11-30 13:15:22 +09:00
Pavel RosickýandHiroshi SHIBATA 94882df3a2 [ruby/digest] jruby support
https://github.com/ruby/digest/commit/2e9dc14693
2021-10-12 20:46:13 +09:00
Nobuyoshi Nakada c423cc932e Refactor Test::Unit::CoreAssertions#assert_nothing_raised
* Separate exception classes to be rescued or reraised
* Use the filtered backtrace in the failure message
* Raise a new `AssertionFailedError` with the original backtrace
2021-10-09 18:14:21 +09:00
Nobuyoshi Nakada 3932227d96 Unify Test::Unit::Assertions#message
Merge `Test::Unit::CoreAssertions#message`.
2021-10-09 16:17:01 +09:00
Nobuyoshi Nakada 489c22b17f Let Test::Unit::CoreAssertions::AllFailures#for yield the key
Similar to `Test::Unit::CoreAssertions::AllFailures#foreach`.
2021-10-09 14:28:27 +09:00
Nobuyoshi Nakada aaa9805e7e Add unique token to separated runner
Same as Test::Unit::CoreAssertions#assert_no_memory_leak.
2021-09-13 15:47:45 +09:00
Nobuyoshi Nakada 30b4da2bc1 Update the test tool path 2021-09-11 16:26:00 +09:00
Hiroshi SHIBATA 806583c093 Change include order for test assertions 2021-09-11 15:17:38 +09:00
Hiroshi SHIBATA 9583d2057d Added missing Assertions for assert_file_predicate 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA d05383812a Replace Test::Assertion and Test::Skip to Test::Unit::AssertionFailedError and Test::Unit::PendedError 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 151a1cd45e Fixed inconsistent require order for assertions and core_assertions 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 4505be6fd0 Removed MiniTest hack for the default gems repo 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 9b026ca39b Integrate Minitest to Test 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 8ec187c091 Replace MiniTest::Unit to Test::Unit::Runner 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 1bec4f251d Move MiniTest::Assertions to Test::Unit::Assertions 2021-09-11 08:48:03 +09:00
Hiroshi SHIBATA 544e37f184 Simplify conditions for CoreAssertion initialization 2021-09-06 19:31:24 +09:00
Nobuyoshi Nakada 3bb6410914 Use equivalent __FILE__ 2021-08-05 14:15:30 +09:00
Nobuyoshi Nakada 5f2987d6c2 Fix relative paths from core_assertions.rb 2021-08-04 20:39:12 +09:00
Nobuyoshi Nakada 1f2b3f2529 Remove an extraneous escape
Since a3fb97465d, this string is not inside the here-document.
2021-08-04 16:59:18 +09:00