Skip to content

Commit

Permalink
Merge branch 'main' into franziska-wegner/2024/january/tests/algorith…
Browse files Browse the repository at this point in the history
…ms/DominatingThetaPath
  • Loading branch information
franziska-wegner authored Jan 6, 2024
2 parents 2a83818 + 48126bc commit 7f5d12a
Show file tree
Hide file tree
Showing 7 changed files with 198 additions and 200 deletions.
6 changes: 3 additions & 3 deletions include/IO/Appearance/Color.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,15 @@ class Color {
~Color(){}


bool operator== ( const Color& rhs ) {
bool operator== ( Color const & rhs ) {
return Red() == rhs.Red() && Green() == rhs.Green() && Blue() == rhs.Blue();
}

bool operator!= ( const Color& rhs ) {
bool operator!= ( Color const & rhs ) {
return !operator==(rhs);
}

friend std::ostream& operator<<(std::ostream& os, const Name color ) {
friend std::ostream& operator<<(std::ostream& os, Name const color ) {
switch ( color ) {
case Name::KITgreen: os << "KITgreen"; break;
case Name::KITgreen70: os << "KITgreen70"; break;
Expand Down
2 changes: 1 addition & 1 deletion src/Runnables/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void setNetworkSetting(egoa::PowerGrid<TGraph> & network, const QString & networ
else if ( networkSetting == "EXACT" ) { network.MakeExact(); }
}

int main(int argc, char *argv[]) {
auto main(int argc, char * argv []) -> int {

// Command line parsing
auto application = std::unique_ptr<QCoreApplication>(std::make_unique<QCoreApplication>(argc, argv));
Expand Down
368 changes: 183 additions & 185 deletions tests/DataStructures/Container/TestBucket.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/DataStructures/Container/TestMappingBinaryHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using ::testing::MatchesRegex;

namespace egoa::test {

std::string buildAssertionString(std::string function, std::string message) {
auto buildAssertionString(std::string const & function, std::string const & message) -> std::string {
return buildAssertionString("MappingBinaryHeap.hpp", "MappingBinaryHeap", function, message);
}

Expand Down
6 changes: 3 additions & 3 deletions tests/DataStructures/Graphs/TestGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ TYPED_TEST( TestGraphFourVertices, AddEdge) {
}

// Add edge (0,1)
TEdgeProperties edgeProperties01 = TEdgeProperties(0);
auto edgeProperties01 = TEdgeProperties(0);
Types::edgeId source = 0;
Types::edgeId target = 1;
Types::edgeId id01 = this->graph_.AddEdge(source, target, edgeProperties01);
Expand All @@ -1635,7 +1635,7 @@ TYPED_TEST( TestGraphFourVertices, AddEdge) {


// Add edge (1,2)
TEdgeProperties edgeProperties12 = TEdgeProperties(1);
auto edgeProperties12 = TEdgeProperties(1);
source = 1;
target = 2;
Types::edgeId id12 = this->graph_.AddEdge(source, target, edgeProperties12);
Expand All @@ -1659,7 +1659,7 @@ TYPED_TEST( TestGraphFourVertices, AddEdge) {


// Add edge (0,3)
TEdgeProperties edgeProperties03 = TEdgeProperties(2);
auto edgeProperties03 = TEdgeProperties(2);
source = 0;
target = 3;
Types::edgeId id03 = this->graph_.AddEdge(source, target, edgeProperties03);
Expand Down
10 changes: 5 additions & 5 deletions tests/DataStructures/Graphs/TestPowerGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3223,12 +3223,12 @@ TEST_F ( TestPowerGridAcm2018MtsfFigure4a
TEST_F ( TestPowerGridAcm2018MtsfFigure4a
, AddLoadAtUsingVertexId )
{
Types::vertexId vertexId = static_cast<Types::vertexId>(2);
auto const vertexId = static_cast<Types::vertexId>(2);
EXPECT_EQ ( 1, network_.NumberOfLoads() );
EXPECT_FALSE ( network_.HasLoadAt ( vertexId ) );
// Add load at vertex 2
TLoadProperties loadProperties;
Types::loadId loadId = network_.AddLoadAt ( vertexId, loadProperties );
Types::loadId const loadId = network_.AddLoadAt ( vertexId, loadProperties );
// Check
EXPECT_TRUE ( network_.HasLoadAt ( vertexId ) );
EXPECT_TRUE ( network_.HasLoad ( loadId ) );
Expand All @@ -3241,7 +3241,7 @@ TEST_F ( TestPowerGridAcm2018MtsfFigure4a
TEST_F ( TestPowerGridAcm2018MtsfFigure4b
, AddLoadAtUsingVertexId )
{
Types::vertexId vertexId = static_cast<Types::vertexId>(1);
auto vertexId = static_cast<Types::vertexId>(1);
EXPECT_EQ ( 1, network_.NumberOfLoads() );
EXPECT_FALSE ( network_.HasLoadAt ( vertexId ) );
// Add load at vertex 2
Expand Down Expand Up @@ -4774,7 +4774,7 @@ TEST_F ( TestNetworkEmpty
<< assertionString;
}

Types::generatorId generatorId = static_cast<Types::generatorId>(0);
auto generatorId = static_cast<Types::generatorId>(0);
assertionString = buildAssertionString ( "PowerGrid.hpp"
, "PowerGrid"
, "AddGeneratorRealPowerSnapshotAt"
Expand Down Expand Up @@ -4966,7 +4966,7 @@ TEST_F ( TestNetworkEmpty
<< assertionString;
}

Types::loadId loadId = static_cast<Types::loadId>(0);
auto loadId = static_cast<Types::loadId>(0);
assertionString = buildAssertionString ( "PowerGrid.hpp"
, "PowerGrid"
, "AddLoadSnapshotAt"
Expand Down
4 changes: 2 additions & 2 deletions tests/DataStructures/TestBound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ using ::testing::Le;

namespace egoa::test {

TestBound::TestBound () {}
TestBound::TestBound () = default;

TestBound::~TestBound () {}
TestBound::~TestBound () = default;

void TestBound::SetUp () {}

Expand Down

0 comments on commit 7f5d12a

Please sign in to comment.