test/simulation_test.rb in y_petri-2.1.18 vs test/simulation_test.rb in y_petri-2.1.20

- old
+ new

@@ -117,11 +117,11 @@ @sim.ts_tt.first.codomain.names.must_equal [:A] @ts.domain.names.must_equal [] @sim.ts_tt.first.domain.names.must_equal [] @sim.timed?.must_equal false @sim.m.must_equal [1, 2] - @sim.pm.must_equal( { A: 1, B: 2 } ) + @sim.p_m.must_equal( { A: 1, B: 2 } ) @sim.recording.must_equal( { 0 => [1, 2]} ) @sim.simulation_method.must_equal :pseudo_euler @sim.core.must_be_kind_of YPetri::Core @sim.ts_tt.first.domain.must_equal [] @sim.send( :ts_transitions ).first.domain_access_code.must_equal '' @@ -131,11 +131,11 @@ cc = @sim.send( :transitions ).ts.delta_closures cc.map( &:call ).must_equal [1] cl = @sim.send( :transitions ).ts.delta_closure cl.call.must_equal Matrix[ [1], [0] ] @sim.step! - @sim.pm.must_equal( { A: 2, B: 2 } ) # marking of A goes up by 1 + @sim.p_m.must_equal( { A: 2, B: 2 } ) # marking of A goes up by 1 @sim.recording.must_equal( { 0 => [1, 2], 1 => [2, 2] } ) end end describe "with clamps" do @@ -275,10 +275,11 @@ .must_equal [2.5, 3.5] ds.interpolate( 2 ) .must_equal [2.5, 4.5] -> { ds.interpolate( 1.5 ) }.must_raise TypeError ds.reconstruct( event: 2 ) - .pm.must_equal( { U: 2.5, V: 4.5 } ) + .p_m.must_equal( { U: 2.5, V: 4.5 } ) + ds.reconstruct( event: 2 ).must_respond_to( :pm ) ds.marking.slice( 2..4 ).series .must_equal [[2.5, 2.5, 2.5], [4.5, 5.5, 6.5]] ds.marking.slice( 2..4 ) .must_equal( { 2 => [2.5, 4.5], 3 => [2.5, 5.5],