Loading tests/tests.cpp +11 −5 Original line number Original line Diff line number Diff line Loading @@ -40,11 +40,15 @@ using namespace std::literals; using namespace std::literals; using namespace std::chrono_literals; using namespace std::chrono_literals; std::ostream& namespace Catch { operator<<(std::ostream& os, const cargo::error_code& ec) { template <> os << ec.name(); struct StringMaker<cargo::error_code> { return os; static std::string convert(const cargo::error_code& ec) { return std::string{ec.name()}; } } }; } // namespace Catch CATCH_REGISTER_ENUM(cargo::transfer_state, cargo::transfer_state::pending, CATCH_REGISTER_ENUM(cargo::transfer_state, cargo::transfer_state::pending, cargo::transfer_state::running, cargo::transfer_state::running, Loading Loading @@ -240,6 +244,7 @@ SCENARIO("Parallel reads", "[flex_stager][parallel_reads]") { // wait for the transfer to complete // wait for the transfer to complete auto s = tx.wait(); auto s = tx.wait(); CAPTURE(s.error()); REQUIRE(s.state() == cargo::transfer_state::completed); REQUIRE(s.state() == cargo::transfer_state::completed); REQUIRE(s.error() == cargo::error_code::success); REQUIRE(s.error() == cargo::error_code::success); Loading Loading @@ -301,6 +306,7 @@ SCENARIO("Parallel writes", "[flex_stager][parallel_writes]") { // wait for the transfer to complete // wait for the transfer to complete auto s = tx.wait(); auto s = tx.wait(); CAPTURE(s.error()); REQUIRE(s.state() == cargo::transfer_state::completed); REQUIRE(s.state() == cargo::transfer_state::completed); REQUIRE(s.error() == cargo::error_code::success); REQUIRE(s.error() == cargo::error_code::success); Loading Loading
tests/tests.cpp +11 −5 Original line number Original line Diff line number Diff line Loading @@ -40,11 +40,15 @@ using namespace std::literals; using namespace std::literals; using namespace std::chrono_literals; using namespace std::chrono_literals; std::ostream& namespace Catch { operator<<(std::ostream& os, const cargo::error_code& ec) { template <> os << ec.name(); struct StringMaker<cargo::error_code> { return os; static std::string convert(const cargo::error_code& ec) { return std::string{ec.name()}; } } }; } // namespace Catch CATCH_REGISTER_ENUM(cargo::transfer_state, cargo::transfer_state::pending, CATCH_REGISTER_ENUM(cargo::transfer_state, cargo::transfer_state::pending, cargo::transfer_state::running, cargo::transfer_state::running, Loading Loading @@ -240,6 +244,7 @@ SCENARIO("Parallel reads", "[flex_stager][parallel_reads]") { // wait for the transfer to complete // wait for the transfer to complete auto s = tx.wait(); auto s = tx.wait(); CAPTURE(s.error()); REQUIRE(s.state() == cargo::transfer_state::completed); REQUIRE(s.state() == cargo::transfer_state::completed); REQUIRE(s.error() == cargo::error_code::success); REQUIRE(s.error() == cargo::error_code::success); Loading Loading @@ -301,6 +306,7 @@ SCENARIO("Parallel writes", "[flex_stager][parallel_writes]") { // wait for the transfer to complete // wait for the transfer to complete auto s = tx.wait(); auto s = tx.wait(); CAPTURE(s.error()); REQUIRE(s.state() == cargo::transfer_state::completed); REQUIRE(s.state() == cargo::transfer_state::completed); REQUIRE(s.error() == cargo::error_code::success); REQUIRE(s.error() == cargo::error_code::success); Loading