Changeset 180

Show
Ignore:
Timestamp:
06/02/06 18:11:13 (2 years ago)
Author:
blackhedd
Message:

eio tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • experiments/machine/test/eio_test.rb

    r159 r180  
    33$:.unshift(File.dirname(__FILE__) + '/../lib') 
    44 
    5 if __FILE__ == $0 
    65 
    7   require 'test/unit' 
    8   require 'machine' 
    9   require 'socket' 
     6require 'test/unit' 
     7require 'machine' 
     8require 'socket' 
    109 
    1110 
    12   class EioTests < Test::Unit::TestCase 
    13     include Machine 
     11class EioTests < Test::Unit::TestCase 
     12  include Machine 
    1413 
    15     def setup 
    16       #Reactor.instance.quiet 
    17       # Have a thread going, because it messes up Ruby's io.sysread function 
    18       Thread.new {sleep 1000} 
    19     end 
     14  def setup 
     15    # Have a thread going, because it messes up Ruby's io.sysread function 
     16    Thread.new {sleep 1000} 
     17  end 
    2018 
    21     def teardown 
    22     end 
     19  def teardown 
     20  end 
    2321 
    24     def test_eio 
     22  def test_eio 
    2523=begin 
    2624    sin = Socket::pack_sockaddr_in(25, "relay.spheriq.net") 
     
    4947=end 
    5048 
     49=begin 
    5150      #sd = Socket.new( Socket::AF_INET, Socket::SOCK_STREAM, 0) 
    5251      #sockaddr = Socket.pack_sockaddr_in( 8901, "127.0.0.1" ) 
     
    7170 
    7271      assert_equal( 1,2) 
    73     end 
     72=end 
     73  end 
    7474 
    75   end 
    7675end