Sha256: 0d8fc1d0b9ef00b97589cae9f85a66c03d0f8fbe1945e61d04d18a7cfd53b550

Contents?: true

Size: 785 Bytes

Versions: 12

Compression:

Stored size: 785 Bytes

Contents

#!/usr/bin/env ruby
require 'test/unit'
require 'trace'
require_relative 'fn_helper'

class TestFinish < Test::Unit::TestCase

  include FnTestHelper

  def test_finish_between_fn
    
    # Finish over functions
    def fact(x)
      return 1 if x <= 1
      x = x * fact(x-1)
      return x
    end
    cmds = %w(step finish) + ['24 == x', 'continue'] 
    d = strarray_setup(cmds)
    d.start
    ##############################
    x = fact(4)
    y = 5
    ##############################
    d.stop # ({:remove => true})
    out = ['-- ',
           'x = fact(4)',
           'METHOD TestFinish#fact(x)',
           '-> ',
           'def fact(x)',
           '<- ',
           'R=> 24',
           'end',
           'D=> true']
    compare_output(out, d, cmds)
  end
  
end






Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
trepanning-1.93.35 test/functional/test-finish.rb
trepanning-1.93.32 test/functional/test-finish.rb
trepanning-0.1.6 test/functional/test-finish.rb
trepanning-0.1.4 test/functional/test-finish.rb
trepanning-0.1.3 test/functional/test-finish.rb
trepanning-0.1.2 test/functional/test-finish.rb
trepanning-0.1.1 test/functional/test-finish.rb
trepanning-0.1.0 test/functional/test-finish.rb
trepanning-0.0.9 test/functional/test-finish.rb
trepanning-0.0.8 test/functional/test-finish.rb
trepanning-0.0.6 test/functional/test-finish.rb
trepanning-0.0.4 test/functional/test-finish.rb