Test for Java class extension depends on Sun JDK specifics
----------------------------------------------------------

                 Key: JRUBY-3037
                 URL: http://jira.codehaus.org/browse/JRUBY-3037
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1.4
            Reporter: Charles Oliver Nutter
             Fix For: JRuby 1.1.5


The following test in test_higher_javasupport depends on a detail of Sun's 
ArrayList implementation: that it will call ensureCapacity when adding:

{noformat}
  class FooArrayList < ArrayList
    $ensureCapacity = false
    def foo
      size
    end
    def ensureCapacity(howmuch)
      $ensureCapacity = true
      super
    end
  end

  def test_extending_java_classes
    l = FooArrayList.new
    assert_equal(0, l.foo)
    l.add(100)
    assert_equal(1, l.foo)
    assert_equal(true, $ensureCapacity)
  end
{noformat}

I have disabled it in the script because it fails to pass on IBM's JDK. We need 
a better test for this behavior (protected method overriding perhaps?) that 
doesn't depend on Sun JDK specific details.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to