Sha256: 914053e73af26d8fe6ef6abecf02cc0421772bffd0805b4ddc6f29be6b1993db

Contents?: true

Size: 462 Bytes

Versions: 4

Compression:

Stored size: 462 Bytes

Contents

covers 'facets/array/rotate'

testcase Array do

  unit :rotate => "clockwise" do
    a = [1,2,3]
    r = a.rotate
    r.assert == [2,3,1]
  end

  unit :rotate => "counter-clockwise" do
    a = [1,2,3]
    r = a.rotate(-1)
    r.assert == [3,1,2]
  end

  unit :rotate! => "clockwise" do
    a = [1,2,3]
    a.rotate!
    a.assert == [2,3,1]
  end

  unit :rotate! => "counter-clockwise" do
    a = [1,2,3]
    a.rotate!(-1)
    a.assert == [3,1,2]
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.9.1 test/core/array/test_rotate.rb
facets-2.9.0 test/core/array/test_rotate.rb
facets-2.9.0.pre.2 test/core/array/test_rotate.rb
facets-2.9.0.pre.1 test/core/array/test_rotate.rb