Sha256: 370e976b37c37a17f6ca0f165ad22b3313c2e186547ed27f5b3a873e593f05a8

Contents?: true

Size: 736 Bytes

Versions: 1

Compression:

Stored size: 736 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/module/memoize.rb
#
# Extracted Fri Sep 08 20:20:32 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/core/module/memoize.rb'


  require 'test/unit'

  class T
    def initialize(a)
      @a = a
    end
    def a
      "#{@a ^ 3 + 4}"
    end
    memoize :a
  end

  # test

  class TC_Memoize < Test::Unit::TestCase

    def setup
      @t = T.new(2)
    end

    def test_memoize_01
      assert_equal( @t.a, @t.a )
    end

    def test_memoize_02
      assert_equal( @t.a.__id__, @t.a.__id__ )
    end

    def test_memoize_03
      assert_equal( @t.a.__id__, @t.a.__id__ )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.7.46 test/lib/facets/core/module/test_memoize.rb