+CommTestTransition::CommTestTransition(aid_t issuer, int times_considered, std::stringstream& stream)
+ : Transition(Type::COMM_TEST, issuer, times_considered)
+{
+ xbt_assert(stream >> comm_ >> sender_ >> receiver_ >> mbox_ >> sbuff_ >> rbuff_ >> size_);
+ XBT_DEBUG("CommTestTransition comm:%lx, sender:%ld receiver:%ld mbox:%u sbuff:%lx rbuff:%lx size:%zu", comm_, sender_,
+ receiver_, mbox_, sbuff_, rbuff_, size_);
+}
+std::string CommTestTransition::to_string(bool verbose) const
+{
+ auto res = xbt::string_printf("%ld: TestComm(from %ld to %ld, mbox=%u", aid_, sender_, receiver_, mbox_);
+ if (verbose) {
+ res += ", sbuff=" + xbt::string_printf("%lx", sbuff_) + ", size=" + std::to_string(size_);
+ res += ", rbuff=" + xbt::string_printf("%lx", rbuff_);
+ }
+ res += ")";
+ return res;
+}
+bool CommTestTransition::depends(const Transition* other) const
+{
+ if (aid_ == other->aid_)
+ return false;
+
+ if (other->type_ < type_)
+ return other->depends(this);
+
+ if (dynamic_cast<const CommTestTransition*>(other) != nullptr)
+ return false; // Test & Test are independent