-/* Copyright (c) 2017-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017-2020. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* Bug report: https://github.com/simgrid/simgrid/issues/40
*
* Task.listen used to be on async mailboxes as it always returned false.
- * This occures in Java and C, but is only tested here in C.
+ * This occurs in Java and C, but is only tested here in C.
*/
#include "simgrid/s4u.hpp"
xbt_assert(mailbox->listen()); // True (1)
XBT_INFO("Task listen works on regular mailboxes");
- std::string* res = static_cast<std::string*>(mailbox->get());
+ const std::string* res = static_cast<std::string*>(mailbox->get());
xbt_assert(*res == "Some data", "Data received: %s", res->c_str());
XBT_INFO("Data successfully received from regular mailbox");