method

test_array

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: TSortTest

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_1_378) is shown here.

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.