method

test_array

ruby latest stable - 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 available.

# 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