Sha256: afa573fc3ff1d720a6a89b395a1d2252ec72a0bd54c40111470c84fed1754b96

Contents?: true

Size: 483 Bytes

Versions: 20

Compression:

Stored size: 483 Bytes

Contents

# Test for facets/autoarray.rb

require 'facets/autoarray.rb'
require 'test/unit'

class TC_Autoarray

  def test_001
    a = Autoarray.new
    assert_equal( 12, a[1][2][3] = 12 )
    assert_equal( [nil, [nil, nil, [nil, nil, nil, 12]]], a )
    assert_equal( [], a[2][3][4] )
    assert_equal( [nil, [nil, nil, [nil, nil, nil, 12]]], a )
    assert_equal( "Negative", a[1][-2][1] = "Negative" )
    assert_equal( [nil, [nil, [nil, "Negative"], [nil, nil, nil, 12]]], a )
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
facets-2.8.4 test/more/test_autoarray.rb
facets-2.8.3 test/more/test_autoarray.rb
facets-2.8.2 test/more/test_autoarray.rb
facets-2.8.1 test/more/test_autoarray.rb
facets-2.8.0 test/more/test_autoarray.rb
facets-2.7.0 test/more/test_autoarray.rb
facets-2.6.0 test/more/test_autoarray.rb
facets-2.1.3 test/unit/test_autoarray.rb
facets-2.2.1 test/unit/test_autoarray.rb
facets-2.2.0 test/unit/test_autoarray.rb
facets-2.4.0 test/test_autoarray.rb
facets-2.3.0 test/class/test_autoarray.rb
facets-2.4.1 test/test_autoarray.rb
facets-2.4.3 test/more/test_autoarray.rb
facets-2.4.2 test/more/test_autoarray.rb
facets-2.4.4 test/more/test_autoarray.rb
facets-2.5.0 test/more/test_autoarray.rb
facets-2.5.1 test/more/test_autoarray.rb
facets-2.4.5 test/more/test_autoarray.rb
facets-2.5.2 test/more/test_autoarray.rb