diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-10 08:47:02 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-10 08:47:02 +0200 |
commit | 274411458b30ba08a9e0adca0a0f5820e9a8648f (patch) | |
tree | 7f896cd7b30998c53b000e03ca7d1c66ef6f502c /test | |
parent | f72393c031018d224318fb4aeff16b6e6c330327 (diff) | |
download | edoors-ruby-274411458b30ba08a9e0adca0a0f5820e9a8648f.zip edoors-ruby-274411458b30ba08a9e0adca0a0f5820e9a8648f.tar.gz |
Twirl merge with Space -> Spin is born
Diffstat (limited to 'test')
-rw-r--r-- | test/test_evendoors.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/test_evendoors.rb b/test/test_evendoors.rb index 2e8a732..60cd49d 100644 --- a/test/test_evendoors.rb +++ b/test/test_evendoors.rb @@ -7,7 +7,7 @@ require 'evendoors' class InputDoor < EvenDoors::Door # def start! - puts " * start #{self.class.name} #{@path}" if EvenDoors::Twirl.debug_routing + puts " * start #{self.class.name} #{@path}" if EvenDoors::Spin.debug_routing @lines = [ "#{name} says : hello", "world ( from #{path} )" ] p = require_p EvenDoors::Particle p.set_dst! EvenDoors::ACT_GET, path @@ -15,11 +15,11 @@ class InputDoor < EvenDoors::Door end # # def stop! - # puts " * stop #{self.class.name} #{@path}" if EvenDoors::Twirl.debug_routing + # puts " * stop #{self.class.name} #{@path}" if EvenDoors::Spin.debug_routing # end # def receive_p p - puts " * #{self.class.name} receive_p : #{p.action}" if EvenDoors::Twirl.debug_routing + puts " * #{self.class.name} receive_p : #{p.action}" if EvenDoors::Spin.debug_routing if p.action==EvenDoors::ACT_GET p.reset! p.set_data 'line', @lines.shift @@ -43,7 +43,7 @@ end class ConcatBoard < EvenDoors::Board # def receive_p p - puts " * #{self.class.name} receive_p : #{p.action}" if EvenDoors::Twirl.debug_routing + puts " * #{self.class.name} receive_p : #{p.action}" if EvenDoors::Spin.debug_routing if p.action==EvenDoors::ACT_ERROR # else @@ -63,28 +63,28 @@ end class OutputDoor < EvenDoors::Door # # def start! - # puts " * start #{self.class.name} #{@path}" if EvenDoors::Twirl.debug_routing + # puts " * start #{self.class.name} #{@path}" if EvenDoors::Spin.debug_routing # end # # def stop! - # puts " * stop #{self.class.name} #{@path}" if EvenDoors::Twirl.debug_routing + # puts " * stop #{self.class.name} #{@path}" if EvenDoors::Spin.debug_routing # end # def receive_p p - if EvenDoors::Twirl.debug_routing + if EvenDoors::Spin.debug_routing puts " * #{self.class.name} receive_p : #{@path} : DATA #{p.get_data('line')}" else puts p.get_data 'line' end - # we do nothing EvenDoors::Twirl.process will detect it and release it + # we do nothing EvenDoors::Spin.process will detect it and release it end # end # -space = EvenDoors::Space.new 'space', :debug_routing=>false, :debug_errors=>true +spin = EvenDoors::Spin.new 'dom0', :debug_routing=>false, :debug_errors=>true # -room0 = EvenDoors::Room.new 'room0', space -room1 = space.add_spot EvenDoors::Room.new 'room1' +room0 = EvenDoors::Room.new 'room0', spin +room1 = spin.add_spot EvenDoors::Room.new 'room1' # input0 = room0.add_spot InputDoor.new 'input0' output0 = room0.add_spot OutputDoor.new 'output0' @@ -97,16 +97,16 @@ room1.add_spot ConcatBoard.new 'concat1' # room0.add_link EvenDoors::Link.new('input0', 'output0', nil, nil, nil) # -p0 = EvenDoors::Twirl.require_p EvenDoors::Particle +p0 = EvenDoors::Spin.require_p EvenDoors::Particle p0.set_data EvenDoors::LNK_SRC, 'input1' p0.set_data EvenDoors::LNK_DSTS, 'concat1?follow,output1' p0.set_data EvenDoors::LNK_FIELDS, 'f0,f2' p0.set_data EvenDoors::LNK_CONDF, 'f0,f1,f2' p0.set_data EvenDoors::LNK_CONDV, 'v0v1v2' p0.set_dst! EvenDoors::SYS_ACT_ADD_LINK, room1.path -room1.send_sys_p p0 # send_sys_p -> room0 -> space -> room1 -> input1 +room1.send_sys_p p0 # send_sys_p -> room0 -> spin -> room1 -> input1 # -space.twirl! +spin.spin! # # # EOF |