Flowdock
method

test_array

Importance_0
v1_8_6_287 - Show latest stable - 0 notes - Class: TSortTest
test_array() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/tsort.rb, line 278
    def test_array
      a = TSortArray[[1], [0], [0], [2]]
      assert_equal([[0, 1], [2], [3]],
        a.strongly_connected_components.map {|nodes| nodes.sort})

      a = TSortArray[[], [0]]
      assert_equal([[0], [1]],
        a.strongly_connected_components.map {|nodes| nodes.sort})
    end
Register or log in to add new notes.