Line data Source code
1 : #include <algorithm> 2 : #include <catch2/catch_test_macros.hpp> 3 : 4 : #include "Static/Solution.hpp" 5 : #include "Static/supply/BPRNotConvexNetwork.hpp" 6 : #include "test/problem/cases.hpp" 7 : 8 : using namespace std; 9 : 10 2 : TEST_CASE("Supply", "[supply][customstaticnetwork]") { 11 2 : Static::Network *network = getStaticNetworkTestCase1(); 12 : 13 3 : SECTION("Get nodes") { 14 2 : vector<Static::Network::Node> nodes = network->getNodes(); 15 1 : sort(nodes.begin(), nodes.end()); 16 4 : REQUIRE(vector<Static::Network::Node>{1, 2, 3} == nodes); 17 : } 18 : 19 3 : SECTION("Convert to graph") { 20 2 : Static::SolutionBase xn; 21 : 22 2 : Alg::Graph G = network->toGraph(xn); 23 : } 24 : 25 2 : delete network; 26 2 : }