Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add one more state to assert.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 9 Feb 2020 10:43:44 +0000 (11:43 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 9 Feb 2020 19:44:08 +0000 (20:44 +0100)
Without that, the comparison 5 lines after was useless.

src/s4u/s4u_Comm.cpp

index b088052..14501e9 100644 (file)
@@ -225,7 +225,8 @@ Comm* Comm::cancel()
 
 bool Comm::test()
 {
-  xbt_assert(state_ == State::INITED || state_ == State::STARTED || state_ == State::FINISHED);
+  xbt_assert(state_ == State::INITED || state_ == State::STARTED || state_ == State::STARTING ||
+             state_ == State::FINISHED);
 
   if (state_ == State::FINISHED)
     return true;