Sha256: 28342b2bb35e73e71f91c19693ef7ae1c6e9791bdc97ceebf491a3a695f21983

Contents?: true

Size: 674 Bytes

Versions: 12

Compression:

Stored size: 674 Bytes

Contents

require 'test_helper'

# Information class unit test class.
class NodeTest < Test::Unit::TestCase
   def test01
      nodes = []
      nodes.push(Node.new(nil))
      nodes.push(Node.new(nodes[0]))
      
      assert(nodes[0].parent == nil)
      assert(nodes[1].parent != nil)
      assert(nodes[1].parent == nodes[0])
      
      assert(nodes[0].is_root?)
      assert(nodes[1].is_root? == false)
      
      assert(nodes[0].root == nodes[0])
      assert(nodes[1].root == nodes[0])
      
      assert(nodes[0].previous_node == nil)
      assert(nodes[0].next_node == nil)
      assert(nodes[1].previous_node == nil)
      assert(nodes[1].next_node == nil)
   end
end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
thechrisoshow-ruby-rtf-0.2.0 test/node_test.rb
rtf-0.3.3 test/node_test.rb
rtf-0.3.2 test/node_test.rb
rtf-0.3.0 test/node_test.rb
panmind-rtf-0.4.1 test/node_test.rb
panmind-rtf-0.4.0 test/node_test.rb
clbustos-rtf-0.3.1 test/node_test.rb
panmind-rtf-0.3.1 test/node_test.rb
clbustos-rtf-0.3.0 test/node_test.rb
clbustos-rtf-0.2.2 test/node_test.rb
clbustos-rtf-0.2.1 test/node_test.rb
clbustos-rtf-0.1.2 test/node_test.rb