Sha256: 8219ae4d3e74ca3ce53d18f54f6cf33a0b59377202b81b02fb3a651f42a663ec
Contents?: true
Size: 439 Bytes
Versions: 16
Compression:
Stored size: 439 Bytes
Contents
require 'facets/array/rotate' require 'test/unit' class TC_Array_Rotate < Test::Unit::TestCase # rotate def test_rotate a = [1,2,3] assert_equal( [3,1,2], a.rotate, 'clockwise' ) assert_equal( [2,3,1], a.rotate(-1), 'counter-clockwise' ) end def test_rotate! a = [1,2,3] a.rotate! assert_equal( [3,1,2], a, 'clockwise' ) a.rotate!(-1) assert_equal( [1,2,3], a, 'counter-clockwise' ) end end
Version data entries
16 entries across 16 versions & 1 rubygems