diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-04 10:56:56 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-04 10:56:56 +0200 |
commit | 7651af4f398d242bcf32961987caafe3081eec2b (patch) | |
tree | 294f393ecf7e4cf555bb8e43c6c2425987a3a655 /test | |
parent | af4a61cf22b121df88cae09aa8116b4eb86afa67 (diff) | |
download | edoors-ruby-7651af4f398d242bcf32961987caafe3081eec2b.zip edoors-ruby-7651af4f398d242bcf32961987caafe3081eec2b.tar.gz |
test/test_evendoors: add Board class tests
Diffstat (limited to 'test')
-rw-r--r-- | test/test_evendoors.rb | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/test/test_evendoors.rb b/test/test_evendoors.rb index 204cc5d..fc76959 100644 --- a/test/test_evendoors.rb +++ b/test/test_evendoors.rb @@ -40,6 +40,22 @@ class InputDoor < EvenDoors::Door # end # +class ConcatBoard < EvenDoors::Board + # + def receive_p p + puts " * #{self.class.name} receive_p : #{p.action}" if EvenDoors::Twirl.debug + if p.action==EvenDoors::ACT_ERROR + # + else + p2 = p.merged_shift + p.set_data 'line', (p.data('line')+' '+p2.data('line')) + release_p p2 + send_p p + end + end + # +end +# class OutputDoor < EvenDoors::Door # # def start! @@ -73,13 +89,14 @@ input1 = InputDoor.new 'input1' output1 = OutputDoor.new 'output1' room1.add_spot input1 room1.add_spot output1 +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.set_data EvenDoors::LNK_SRC, 'input1' -p0.set_data EvenDoors::LNK_DSTS, 'output1' -p0.set_data EvenDoors::LNK_FIELDS, 'fx,fy,fz' +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 |