test/place_test.rb in y_petri-2.2.2 vs test/place_test.rb in y_petri-2.2.3

- old
+ new

@@ -1,9 +1,8 @@ #! /usr/bin/ruby # encoding: utf-8 -# gem 'minitest', '=4.7.4' # try uncommenting this line if problems appear require 'minitest/autorun' require_relative '../lib/y_petri' # tested component itself # require 'y_petri' # require 'sy' @@ -59,10 +58,10 @@ begin; g1.validate 11.1; g2.validate 11.1; p.guard.( 11.1 ); :nothing_raised rescue; :error end.must_equal :nothing_raised -> { g2.validate Complex( 1, 1 ) }.must_raise YPetri::GuardError p.marking "must be in 0..10" do |m| fail unless ( 0..10 ) === m end p.guards.size.must_equal 4 - g = p.federated_guard_closure + g = p.common_guard_closure -> { g.( 11.1 ) }.must_raise YPetri::GuardError begin; p.marking = -1.11; rescue YPetri::GuardError => err err.message.must_equal 'Marking -1.11:Float of P1 should not be negative!' end end