Skip to content

Commit

Permalink
Investigating bug #126: testcase for invoking same command multiple t…
Browse files Browse the repository at this point in the history
…imes.

git-svn-id: https://svn.mech.kuleuven.be/repos/orocos/orocos-trunk@5195 ce417995-dfc9-0310-95a0-acdaff106893
  • Loading branch information
psoetens committed Jul 27, 2006
1 parent 3d308b6 commit a5a165c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions tests/dispatch_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,16 @@ void DispatchTest::testDispatchUntilFail()
this->finishDispatch( &gtc, "x");
}

void DispatchTest::testSendDispatch()
void DispatchTest::testDispatchMany()
{
// XXX not a valid test. send not present in Orocos, this looks like 'try'
// a program which must not fail, even if the command failes.
string prog = "program x { send space.subspace.test.assert(false) \n }";
string prog = string("program x { ")
+" do space.subspace.test.instantDone()\n"
+" do space.subspace.test.instantDone()\n"
+" do space.subspace.test.instantDone()\n"
+" do space.subspace.test.instantDone()\n"
+" }";
this->doDispatch( prog, &gtc );

CPPUNIT_ASSERT( gtc.engine()->programs()->getProgramStatus("x") != ProgramInterface::Status::error );
Expand Down
3 changes: 2 additions & 1 deletion tests/dispatch_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class DispatchTest : public CppUnit::TestFixture
CPPUNIT_TEST( testDispatchTry );
CPPUNIT_TEST( testDispatchUntil );
CPPUNIT_TEST( testDispatchUntilFail );
CPPUNIT_TEST( testDispatchMany );
CPPUNIT_TEST_SUITE_END();

//CPPUNIT_TEST( testSendDispatch );
Expand Down Expand Up @@ -74,7 +75,7 @@ class DispatchTest : public CppUnit::TestFixture

void testParseDispatch();
void testDispatchCondition();
void testSendDispatch();
void testDispatchMany();
void testDispatchFailure();
void testDispatchAnd();
void testDispatchTry();
Expand Down

0 comments on commit a5a165c

Please sign in to comment.