Sha256: 19d9a45bc12d6e5423aab3d2a03b1bba4b9c129bc895465254470f0b29688335

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

#
# Testing OpenWFEru
#
# John Mettraux at openwfe.org
#

require 'flowtestbase'
require 'openwfe/def'


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

  #def setup
  #end

  #def teardown
  #end

  #
  # Test 0
  #

  class TestReserve39b0 < OpenWFE::ProcessDefinition
    #
    # doesn't prove it enough though...
    #
    concurrence do
      reserve :mutex => :toto do
        sequence do
          test_alpha
          test_bravo
        end
      end
      reserve :mutex => :toto do
        sequence do
          test_charly
          test_delta
        end
      end
    end
  end

  def test_0

    #log_level_to_debug

    dotest(
      TestReserve39b0,
      [ %w{ test-charly test-delta test-alpha test-bravo }.join("\n"),
        %w{ test-alpha test-bravo test-charly test-delta }.join("\n") ])
  end

  #
  # Test 1
  #

  class TestReserve39b1 < OpenWFE::ProcessDefinition
    concurrence do
      reserve :mutex => :toto do
        test_b
      end
      sequence do
        reserve :mutex => :toto do
          test_c
        end
        reserve :mutex => :toto do
          test_d
        end
      end
    end
  end

  def test_1

    dotest TestReserve39b1, "test-b\ntest-c\ntest-d"
      #
      # currently the only combination produced, could change
      # with later versions of Ruby... Hopefully :)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruote-0.9.19 test/ft_39b_reserve.rb