Sha256: 8d5854575b45565e0429285c6c7e1844bd1e14b304dcc71b3655db8c3a343ea6

Contents?: true

Size: 679 Bytes

Versions: 10

Compression:

Stored size: 679 Bytes

Contents

  #  _____         _
  # |_   _|__  ___| |_
  #   | |/ _ \/ __| __|
  #   | |  __/\__ \ |
  #   |_|\___||___/\__|
  #
  # for lib/facets/kernel/deepcopy.rb
  #
  # Extracted Mon Sep 03 16:23:07 -0700 2007
  # w/ Test Extraction Ratchet
  #

 require 'facets/kernel/deepcopy.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.0.0 test/unit/kernel/test_deepcopy.rb
facets-2.0.1 test/unit/kernel/test_deepcopy.rb
facets-2.0.2 test/unit/kernel/test_deepcopy.rb
facets-2.1.0 test/unit/kernel/test_deepcopy.rb
facets-2.1.1 test/unit/kernel/test_deepcopy.rb
facets-2.1.2 test/unit/kernel/test_deepcopy.rb
facets-2.0.5 test/unit/kernel/test_deepcopy.rb
facets-2.0.3 test/unit/kernel/test_deepcopy.rb
facets-2.0.4 test/unit/kernel/test_deepcopy.rb
facets-2.1.3 test/unit/kernel/test_deepcopy.rb