Sha256: f0b02d55b5e2cb6ca2b26a82a8d6b131df9f918e386e53cb90ba86ab8d55ab51

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Mon Oct  9 22:19:44 JST 2006
#

require 'openwfe/def'

require 'flowtestbase'


class FlowTestRecursion < Test::Unit::TestCase
  include FlowTestBase

  #def teardown
  #end

  #def setup
  #end

  #
  # test 0
  #

  class Test0 < OpenWFE::ProcessDefinition
    sequence do
      #print_i
      #subprocess :ref => "Test"
      subprocess :ref => "Testy"
    end
    process_definition :name => "Testy" do
      sequence do
        print_i
        subprocess :ref => "Testy"
      end
      #_loop do
      #  print_i
      #end
    end
  end

  def test_0

    i = 0
    last = Time.now.to_f

    @engine.register_participant :print_i do
      now = Time.now.to_f
      print "#{i}"
      if i % 10 == 0
        print "("
        print "#{now-last}"
        print " #{@engine.get_expression_storage.size}"
        print ")"
      end
      print " "
      last = now
      i += 1
    end

    #dotest TestTag0, "blah"
    @engine.launch Test0

    sleep 360
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.19 test/bm/ft_recu.rb