LCOV - code coverage report
Current view: top level - app/test - test_AllOrNothing.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 10 10 100.0 %
Date: 2023-08-17 16:45:52 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include <catch2/catch_test_macros.hpp>
       2             : #include <catch2/matchers/catch_matchers_floating_point.hpp>
       3             : 
       4             : #include "Static/algos/DijkstraAoN.hpp"
       5             : #include "test/problem/cases.hpp"
       6             : 
       7             : using namespace std;
       8             : 
       9             : using Catch::Matchers::WithinAbs;
      10             : 
      11           1 : TEST_CASE("All or Nothing", "[allornothing]") {
      12           1 :     auto [supply, demand] = getStaticProblemTestCase1();
      13             : 
      14           1 :     Static::DijkstraAoN  solver;
      15           1 :     Static::SolutionBase x = solver.solve(*supply, *demand);
      16             : 
      17           2 :     REQUIRE_THAT(x.getFlowInEdge(1), WithinAbs(0.0, 1e-10));
      18           2 :     REQUIRE_THAT(x.getFlowInEdge(2), WithinAbs(4.0, 1e-10));
      19           2 :     REQUIRE_THAT(x.getFlowInEdge(3), WithinAbs(4.0, 1e-10));
      20             : 
      21           1 :     delete supply;
      22           2 :     delete demand;
      23           1 : }

Generated by: LCOV version 1.14