Sha256: df2ddd1e188d4c784c70b4d8bddf13bcd31b5d779debad9215f93d8f2d417fca

Contents?: true

Size: 390 Bytes

Versions: 10

Compression:

Stored size: 390 Bytes

Contents

require 'facets/kernel/deep_copy.rb'
require 'test/unit'

class TestKernelCopy < Test::Unit::TestCase

  # fixtures for copy / deep_copy
  class A
    attr_reader :a
    def initialize
      @a = 1
    end
  end

  class B
    attr_reader :b
    def initialize
      @b = A.new
    end
  end

  def test_deep_copy
    o = B.new
    oc = o.deep_copy
    assert_equal( 1, o.b.a  )
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
facets-2.6.0 test/core/kernel/test_deepcopy.rb
facets-2.4.0 test/kernel/test_deepcopy.rb
facets-2.4.1 test/kernel/test_deepcopy.rb
facets-2.4.4 test/core/kernel/test_deepcopy.rb
facets-2.4.2 test/core/kernel/test_deepcopy.rb
facets-2.4.3 test/core/kernel/test_deepcopy.rb
facets-2.4.5 test/core/kernel/test_deepcopy.rb
facets-2.5.0 test/core/kernel/test_deepcopy.rb
facets-2.5.1 test/core/kernel/test_deepcopy.rb
facets-2.5.2 test/core/kernel/test_deepcopy.rb