Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 1.5.0.RC3
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (14 sloc) 0.361 kb
require 'test/unit'
require 'java'
class TestNullChannel < Test::Unit::TestCase
import java.nio.ByteBuffer
import org.jruby.util.io.NullChannel
def test_write_advances_buffer
buf = ByteBuffer.allocate(128)
ch = NullChannel.new
50.times { buf.put(1) } # 50 longs
buf.flip
ch.write(buf)
assert_equal(50, buf.position)
end
end
Jump to Line
Something went wrong with that request. Please try again.