X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/308bf9e4897e3606f017559cefabd29fb7eaec03..69aaa26fa5228c31e55086fa166479732a9cd1b7:/teshsuite/s4u/activity-lifecycle/testing_comm.cpp diff --git a/teshsuite/s4u/activity-lifecycle/testing_comm.cpp b/teshsuite/s4u/activity-lifecycle/testing_comm.cpp index 325647473e..87b7af7c30 100644 --- a/teshsuite/s4u/activity-lifecycle/testing_comm.cpp +++ b/teshsuite/s4u/activity-lifecycle/testing_comm.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2021. 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. */ @@ -6,18 +6,6 @@ #include "activity-lifecycle.hpp" #include -// Normally, we should be able use Catch2's REQUIRE_THROWS_AS(...), but it generates errors with Address Sanitizer. -// They're certainly false positive. Nevermind and use this simpler replacement. -#define REQUIRE_NETWORK_FAILURE(...) \ - do { \ - try { \ - __VA_ARGS__; \ - FAIL("Expected exception NetworkFailureException not caught"); \ - } catch (simgrid::NetworkFailureException const&) { \ - XBT_VERB("got expected NetworkFailureException"); \ - } \ - } while (0) - static void test_link_off_helper(double delay) { const double start = simgrid::s4u::Engine::get_clock(); @@ -284,7 +272,7 @@ TEST_CASE("Activity lifecycle: comm activities") int* data; simgrid::s4u::CommPtr comm = simgrid::s4u::Mailbox::by_name("mb")->get_async(&data); std::vector pending_comms = {comm}; - REQUIRE_NETWORK_FAILURE(simgrid::s4u::Comm::wait_any(&pending_comms)); + REQUIRE_NETWORK_FAILURE(simgrid::s4u::Comm::wait_any(pending_comms)); }); simgrid::s4u::ActorPtr sender = simgrid::s4u::Actor::create("sender", all_hosts[2], []() {