/[freeride]/freeride/test/utest_databus.rb
ViewVC logotype

Diff of /freeride/test/utest_databus.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by richkilmer, Fri Sep 13 04:32:29 2002 UTC revision 1.11 by richkilmer, Tue Nov 19 04:10:54 2002 UTC
# Line 216  class Test_DataBus < TestCase Line 216  class Test_DataBus < TestCase
216    def test_9_slot_links    def test_9_slot_links
217      bus = FreeBASE::DataBus.new      bus = FreeBASE::DataBus.new
218      parent = bus["parent"]      parent = bus["parent"]
219      parent.link("child", "/parent2/child2")      notify_link = false
220      assert_equal('/parent2/child2/', bus["/parent/child"].path)      
221      assert(parent.is_linked?('child'))      bus['parent'].subscribe do |event, slot|
222      parent.unlink('child')        notify_link = true if link = :notify_slot_link
223        end
224        child = parent.link("child", "/parent2/child2")
225      assert_equal('/parent/child/', bus["/parent/child"].path)      assert_equal('/parent/child/', bus["/parent/child"].path)
226      assert(!parent.is_linked?('child'))      assert_equal('/parent2/child2/subslot/', bus["/parent/child/subslot"].path)
227        assert(parent['child'].is_link_slot?)
228        assert(notify_link)
229        parent['child'].unlink
230        assert_equal('/parent/child/subslot/', bus["/parent/child/subslot"].path)
231        assert(!parent['child'].is_link_slot?)
232    end    end
233        
234  end  end

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26