[complement-svn] SF.net SVN: complement: [1643] trunk/complement/explore/test/virtual_time/ test
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-07-26 06:34:29
|
Revision: 1643 http://complement.svn.sourceforge.net/complement/?rev=1643&view=rev Author: complement Date: 2007-07-25 23:34:02 -0700 (Wed, 25 Jul 2007) Log Message: ----------- check dispatch in group of two first, then in group of three: this has difference from algo point of view Modified Paths: -------------- trunk/complement/explore/test/virtual_time/test/unit_test.cc trunk/complement/explore/test/virtual_time/test/vt_dispatch.cc trunk/complement/explore/test/virtual_time/test/vt_operations.h Modified: trunk/complement/explore/test/virtual_time/test/unit_test.cc =================================================================== --- trunk/complement/explore/test/virtual_time/test/unit_test.cc 2007-07-26 06:32:14 UTC (rev 1642) +++ trunk/complement/explore/test/virtual_time/test/unit_test.cc 2007-07-26 06:34:02 UTC (rev 1643) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/07/25 22:14:50 ptr> +// -*- C++ -*- Time-stamp: <07/07/26 09:41:24 ptr> #include "vt_operations.h" @@ -20,8 +20,9 @@ t.add( &vtime_operations::VTMess_core, vt_oper, "VTmess core transfer", tc[2] = t.add( &vtime_operations::gvt_add, vt_oper, "Group VT add", tc[1] ) ); - t.add( &vtime_operations::VTDispatch, vt_oper, "VTDispatch", - t.add( &vtime_operations::vt_object, vt_oper, "VT order", tc[2] ) ); + t.add( &vtime_operations::VTDispatch2, vt_oper, "VTDispatch2", + t.add( &vtime_operations::VTDispatch1, vt_oper, "VTDispatch1", + t.add( &vtime_operations::vt_object, vt_oper, "VT order", tc[2] ) ) ); return t.girdle(); } Modified: trunk/complement/explore/test/virtual_time/test/vt_dispatch.cc =================================================================== --- trunk/complement/explore/test/virtual_time/test/vt_dispatch.cc 2007-07-26 06:32:14 UTC (rev 1642) +++ trunk/complement/explore/test/virtual_time/test/vt_dispatch.cc 2007-07-26 06:34:02 UTC (rev 1643) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/07/25 23:12:24 ptr> +// -*- C++ -*- Time-stamp: <07/07/26 09:53:24 ptr> #include "vt_operations.h" @@ -73,11 +73,35 @@ EV_EDS( ST_NULL, VT_MESS2, handler ) END_RESPONSE_TABLE -int EXAM_IMPL(vtime_operations::VTDispatch) +int EXAM_IMPL(vtime_operations::VTDispatch1) { vt::VTDispatcher dsp; Dummy dummy1; Dummy dummy2; + + dsp.Subscribe( dummy1.self_id(), 1, 0 ); + dsp.Subscribe( dummy2.self_id(), 2, 0 ); + + stem::Event ev( VT_MESS2 ); + ev.src( dummy1.self_id() ); + + ev.value() = "hello"; + + dsp.VTSend( ev, 0 ); + + dummy2.wait(); + + EXAM_CHECK( dummy2.msg == "hello" ); + EXAM_CHECK( dummy1.msg == "" ); + + return EXAM_RESULT; +} + +int EXAM_IMPL(vtime_operations::VTDispatch2) +{ + vt::VTDispatcher dsp; + Dummy dummy1; + Dummy dummy2; Dummy dummy3; dsp.Subscribe( dummy1.self_id(), 1, 0 ); Modified: trunk/complement/explore/test/virtual_time/test/vt_operations.h =================================================================== --- trunk/complement/explore/test/virtual_time/test/vt_operations.h 2007-07-26 06:32:14 UTC (rev 1642) +++ trunk/complement/explore/test/virtual_time/test/vt_operations.h 2007-07-26 06:34:02 UTC (rev 1643) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/07/25 22:01:43 ptr> +// -*- C++ -*- Time-stamp: <07/07/26 09:40:39 ptr> #ifndef __vt_operations_h #define __vt_operations_h @@ -18,7 +18,8 @@ int EXAM_DECL(vt_object); - int EXAM_DECL(VTDispatch); + int EXAM_DECL(VTDispatch1); + int EXAM_DECL(VTDispatch2); }; #endif // __vt_operations_h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |