summaryrefslogtreecommitdiff
path: root/tool/lib/core_assertions.rb
AgeCommit message (Collapse)Author
4 daysCount assertions in child processesNobuyoshi Nakada
Fix up GH-15785.
10 daysMake `assert_separately` to count assertions in forked processesNobuyoshi Nakada
10 daysMake `assert_separately` tolerant to core method redefinitionsNobuyoshi Nakada
And split `TestRubyOptimization#test_objtostring` for each target class.
2025-11-13Ractor support Windows platform. We need to skip only failing tests of RubyGemsHiroshi SHIBATA
2025-11-13Use omit instead of return in assertionHiroshi SHIBATA
2025-11-13Omit assert_ractor with Windows platformHiroshi SHIBATA
2025-11-12assert_separately: Suppress experimental warningsNobuyoshi Nakada
test-unit depends on power_assert that the recent versions require ruby 3.1 or later. While test-unit rescues syntax error at loading power_assert for old ruby versions, warnings for experimental features are not suppressed, and `assert_separately` fails because stderr is not empty, by default. Since adding `required_ruby_version` to power_assert causes the installation with old rubygems to fail, we just ignore warnings for experimental features totally.
2025-11-12Support multiple require in assert_ractorHiroshi SHIBATA
2025-10-17Compatibility with test-unit-ruby-coreNobuyoshi Nakada
2025-10-17Skip low precision clocks to measure performancesNobuyoshi Nakada
2025-10-11Ignore thread not suspended warning messages in LSANPeter Zhu
When a process with multiple threads is forked, LSAN outputs warning messages to stderr like: ==276855==Running thread 276851 was not suspended. False leaks are possible. We should ignore messages like this in tests.
2025-10-09Rename Test::Sanitizers.enabled? to Test::Sanitizers.asan_enabled?Peter Zhu
2025-10-09Rename ext/-test-/asan to ext/-test-/sanitizersPeter Zhu
2025-10-07Always load -test-/asan in testsPeter Zhu
-test-/asan should always be available.
2025-10-07Verify that RubyGems is enabled by defaultNobuyoshi Nakada
2025-08-15Don't change Encoding.default_internal in assert_raise_with_messagePeter Zhu
For most tests (except two), we don't need to change Encoding.default_internal in assert_raise_with_message. We're trying to run the test suite across multiple Ractors and modifying Encoding.default_internal can cause other concurrently running tests to fail.
2025-08-05Added missing block argumentHiroshi SHIBATA
2025-08-05Sync https://github.com/ruby/test-unit-ruby-core/pull/8Hiroshi SHIBATA
2025-06-16Suppress stderr output in `TestRubyOptions#assert_segv`Nobuyoshi Nakada
It is checked against the given `list`, do not print the same output twice. Notes: Merged: https://github.com/ruby/ruby/pull/13624
2025-06-04Support Ractor#value and Ractor#join for old versions of RubyHiroshi SHIBATA
https://github.com/ruby/test-unit-ruby-core/pull/9 https://github.com/ruby/test-unit-ruby-core/pull/10
2025-03-17Fix `assert_warning` for `Proc`Nobuyoshi Nakada
`Proc` does not have `encoding` method. Also, make `assert_raise_with_message` accept a `Proc` as the expected pattern, as well. Notes: Merged: https://github.com/ruby/ruby/pull/12923
2025-01-24Add `Test::Unit::CoreAssertions#assert_raise_kind_of`Nobuyoshi Nakada
Similar to `Test::Unit::assert_raise`, but allows sub classes too. Notes: Merged: https://github.com/ruby/ruby/pull/12625
2024-09-12Accept version rangeNobuyoshi Nakada
Single `Integer` argument means an exact match to the major version. Notes: Merged: https://github.com/ruby/ruby/pull/11604
2024-09-10Add predicates for platformsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11583
2024-08-15Improve base time of assert_linear_performance (#11369)tomoya ishida
Remove `.ceil` from base time calculation that makes 10x gap. This will make the assertion more strict and also less flaky. Notes: Merged-By: kou <kou@clear-code.com>
2024-02-28Skip assert_no_memory_leak when ASAN is enabledKJ Tsanaktsidis
ASAN greatly increases the memory footprint of Ruby, so these static thresholds are not appropriate. There's no real need to run these tests under ASAN. [Bug #20274]
2023-10-20Added explicitly begin-end block for Ruby 2.4.Hiroshi SHIBATA
strscan, ipaddr and some default gems still support Ruby 2.4. After this, I extract this CoreAssertions to their repositories.
2023-09-12Suppress warning for shadowing outer local variableHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/8419
2023-08-29Expose Test.filter_backtrace for the default gems.Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/8313
2023-04-29core_assertions.rb: Support old rubiesNobuyoshi Nakada
Some symbol argument might not be accepted by Process.clock_gettime. Notes: Merged: https://github.com/ruby/ruby/pull/7773
2023-04-06core_assertions.rb: Prefer CPU time clocksNobuyoshi Nakada
To prevent influence from other processes. Notes: Merged: https://github.com/ruby/ruby/pull/7661
2023-04-06core_assertions.rb: Extract common code blockNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7661
2023-04-06core_assertions.rb: Tweak timeout limitNobuyoshi Nakada
Increase the timeout limit when variance at rehearsal is small. Notes: Merged: https://github.com/ruby/ruby/pull/7661
2023-04-02Skip assert_linear_performance for RJITTakashi Kokubun
2023-03-23core_assertions.rb: Raise `Timeout::Error` explicitlyNobuyoshi Nakada
So that `assert_raise` inside the block works.
2023-03-22core_assertions.rb: Fix backward compatibility with pre 2.7Nobuyoshi Nakada
2023-03-22[DOC] Update comment of assert_pattern_listNobuyoshi Nakada
`pattern_list` may contain string since d903e7672637.
2023-03-22core_assertions.rb: Refine `assert_linear_performance`Nobuyoshi Nakada
* Calculate each timeout from the ratio of each factor to the first factor.
2023-03-18core_assertions.rb: Relax `assert_linear_performance`Nobuyoshi Nakada
* Use an `Enumerable` as factors, instead of three arguments. * Include `assert_operator` time in rehearsal time. * Round up max expected time. Notes: Merged: https://github.com/ruby/ruby/pull/7554
2023-03-16Revert "core_assertions.rb: Refine `assert_linear_performance`"Takashi Kokubun
This reverts commit cae4342dd559e34c1ce6219593f77f0ad80286da. 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-16core_assertions.rb: Refine `assert_linear_performance`Nobuyoshi Nakada
* Use an `Enumerable` as factors, instead of three arguments.
2023-03-15core_assertions.rb: Refine `assert_linear_performance`Nobuyoshi Nakada
* Add `rehearsal` keyword argument * Stop repeating with the same factor
2023-03-12Add test for linear performanceNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/7506
2023-03-12core_assertions.rb: Consider backward compatibilitiesNobuyoshi Nakada
This file is copied to default gems, which might support older versions.
2023-03-06s/MJIT/RJIT/Takashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/7462
2023-01-05Skip Test::Unit::AutoRunner logic in ruby/ruby repositoryHiroshi SHIBATA
2023-01-05[ruby/openssl] Stop AutoRunner with test-unitHiroshi SHIBATA
https://github.com/ruby/openssl/commit/0d4cd8b9ca
2022-09-01Fix test fail with assert_ractor outside of ruby/ruby repoHiroshi SHIBATA
Revert 806583c093ecc2d67830f0a8f0d94decf0ed71e5
2022-08-19Allow strings in assert_pattern_listNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6252
2022-06-25Prevent accidental use of assert_raisesNobuyoshi Nakada