[ruby-core:92219] [Ruby trunk Bug#15746] 11 test cases run failed

From: changqing.li@...
Date: 2019-04-09 09:49:19 UTC
List: ruby-core #92219
Issue #15746 has been updated by sandy-lcq (sandy li).

Description updated

nobu (Nobuyoshi Nakada) wrote:
> Run these tests under the build tree.

Hi,

I don't think this is problem where I run the test. Can you explain more? Thanks.
Besides, I run the test on target since cross compile.

1. for error like: 
Error: test_error_handling(TestCMath):
NoMethodError: undefined method `assert_raise_with_message' for #TestCMath:0x000056300b0c5800
Did you mean? assert_raise_message

no matter where I run the test,  the version of my std lib (2.6.2) Test::Unit::Assertion don't have this method.
this is why I add "require minitest/autorun"

2. for this error:
test_extlibs.rb:6:in `<main>': uninitialized constant Test (NameError)

Test is defined in test/unit.rb, can we use it if we don't require it? 



----------------------------------------
Bug #15746: 11 test cases run failed 
https://bugs.ruby-lang.org/issues/15746#change-77556

* Author: sandy-lcq (sandy li)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.2
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Below problem is find on 2.5.3 and also 2.6.2. 
and ruby is compiled from source. and source get from:
http://cache.ruby-lang.org/pub/ruby


below test failed:
ruby test_delegate.rb
ruby test_forwardable.rb
ruby test_pstore.rb
ruby test_securerandom.rb
ruby test_tempfile.rb
ruby test_time.rb
ruby test_timeout.rb
ruby test_tmpdir.rb
ruby test_weakref.rb
ruby test_cmath.rb

ruby test_extlibs.rb


**The top nine mainly failed like:**

1.Error: test_error_handling(TestCMath):
  NoMethodError: undefined method `assert_raise_with_message' for #<TestCMath:0x000056300b0c5800>
  Did you mean?  assert_raise_message

As I checked,  assert_raise_with_message exist in stdlib 2.1.2  -> Test::Unit::Assertions.
refer: 
https://ruby-doc.org/stdlib-2.1.2/libdoc/test/unit/rdoc/Test/Unit/Assertions.html

but for ruby 2.6.2, Test::Unit::Assertions don't have this method.


2.test_cmath.rb:31:in `test_log'
Error: test_log(TestCMath): RangeError: can't convert 0.8047189562170503+1.1071487177940904i into Float


As I checked,  assert_in_delta exist in test/unit/assertion.rb, but require argument be float.

**above problem can be solved by add "require 'minitest/autorun'"**



**The last test failed like:**
Traceback (most recent call last):
test_extlibs.rb:6:in `<main>': uninitialized constant Test (NameError)

need to add require "test/unit"




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next