Skip to content

Commit

Permalink
Activate Tests for the Datastructure PowerGrid (#53)
Browse files Browse the repository at this point in the history
* Activate Test for the Datastructure PowerGrid
* DeathTest Condition for AddGeneratorAt with Exception
* DeathTest Condition for RemoveGeneratorAt with Exception
* DeathTest Condition for HasGeneratorAt with Exception
* DeathTest Condition for RemoveGeneratorAt using generator Id & non-existing VertexId with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & GeneratorId with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & Generator with Exception
* DeathTest Condition for RemoveGeneratorAt using VertexId & Generator with Exception
* DeathTest condition for `RemoveGeneratorAt` using generator non-existing `VertexId` with exception
* DeathTest condition for `RemoveGeneratorAt` using `VertexId` & `Generator` with exception
* DeathTest condition for `HasGeneratorAt` using `VertexId` with exception
* DeathTest condition for `HasGeneratorAt` using `VertexId` with exception
* DeathTest condition for `HasGeneratorAt` using `Vertex` object with exception
* DeathTest condition for `GeneratorId`s with exception
* DeathTest condition for `GeneratorAt` with exception
* DeathTest condition for `GeneratorsAt` using `VertexId` with exception
* DeathTest condition for `GeneratorsAt` using `Vertex` object with exception
* DeathTest condition for `TotalRealPowerGenerationBoundAt` with exception
* DeathTest condition for `TotalRealPowerGenerationAt` with exception
* DeathTest condition for `TotalRealPowerGenerationAt` non-existing `Vertex` with exception
* [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
* DeathTest condition for `TotalRealPowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `TotalReactivePowerGenerationBoundAt` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `TotalReactivePowerGenerationAt` non-existing `Vertex` with exception
* DeathTest condition for `AddLoadAt` using `VertexId` with exception
* DeathTest condition for `AddLoadAt` using `VertexId` with exception
* DeathTest condition for `AddLoadAt` using `Vertex` object with exception
* DeathTest condition for `RemoveLoadAt` using `VertexId` & `LoadId` with exception
* DeathTest condition for `RemoveLoadAt` using `VertexId` where `LoadId` does not exists with exception
* DeathTest condition for `HasLoadAt` with exception
* DeathTest condition for `LoadIds` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` with exception
* DeathTest condition for `LoadAt` using `VertexId` with exception
* DeathTest condition for `LoadAt` using `Vertex` with exception
* DeathTest condition for `RealPowerLoadAt` with exception
* DeathTest condition for `RealPowerLoadAt` using `Vertex` with exception
* DeathTest condition for `TotalRealPowerLoadBoundAt` with exception
* DeathTest condition for `AddGeneratorRealPowerSnapshotAt` with exception
* DeathTest condition for `AddLoadSnapshotAt` with exception
* DeathTest condition for `AddSnapshotTimestamp` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotsAt` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotsAt` with exception
* DeathTest condition for `LoadSnapshotOfLoadsSize` with exception
* DeathTest condition for `LoadSnapshotOfConstNoneDeath` with exception
* [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
* Add missing namespace
* Repair path to test cases
* Update to Psa to PSA
* DeathTest condition for `AddSnapshotWeighting` with exception
* DeathTest condition for `GeneratorRealPowerSnapshotAt` using `GeneratorId` & `Timestamp` with exception
* Remove assertion from exception handling part/release mode path
* Comment out some tests that need further investigation
* DeathTest condition for `TimestampAt` with exception
* Comment out some tests that need further investigation
* Add missing header for "Helper/TestHelper.hpp"
* Remove clang linter warning
  What?
    * warning: escaped string literal can be written as a raw string literal [modernize-raw-string-literal]
* Comment out TestPowerGridPyPsaExample test
  Why?
    * Cause coverage process to fail due to unknown problem
* Remove and add some `ctest` flags
  • Loading branch information
franziska-wegner authored Jan 2, 2024
1 parent 3322f93 commit 8d8b6c9
Show file tree
Hide file tree
Showing 5 changed files with 1,996 additions and 493 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ jobs:
# Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test detected
# 3 threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more
# explanation and suggested solutions, especially if this is the last message you see before your test times out.
run: ctest --verbose -j1 --build-config ${{ matrix.build_type }} -T Test
run: ctest --verbose -j1 --build-config ${{ matrix.build_type }} --test-action Test

- name: Test Coverage Collection (Ubuntu GCC Debug only)
working-directory: ${{ steps.strings.outputs.build-output-dir }}
Expand All @@ -272,7 +272,7 @@ jobs:
# 3 threads. See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads for more
# explanation and suggested solutions, especially if this is the last message you see before your test times out.
if: ${{ startsWith(matrix.os,'ubuntu-') && startsWith(matrix.c_compiler,'gcc') && matrix.build_type == 'Debug' }}
run: ctest --verbose -j1 --build-config ${{ matrix.build_type }} -T Coverage
run: ctest --rerun-failed --output-on-failure --verbose --build-config ${{ matrix.build_type }} --test-action Coverage

- name: Upload coverage reports to Codecov (Ubuntu GCC Debug only)
if: ${{ startsWith(matrix.os,'ubuntu-') && startsWith(matrix.c_compiler,'gcc') && matrix.build_type == 'Debug' }}
Expand Down
6 changes: 3 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ add_executable(TestDynamicGraph DataStructures/Graphs/TestDynamicGraph.cpp)
target_link_libraries(TestDynamicGraph EGOA ${GUROBI_LIBRARIES} gtest gtest_main gmock_main)
add_test(NAME TestDynamicGraph COMMAND TestDynamicGraph)

# add_executable(TestPowerGrid DataStructures/Graphs/TestPowerGrid.cpp)
# target_link_libraries(TestPowerGrid EGOA ${GUROBI_LIBRARIES} gtest gtest_main gmock_main)
# add_test(NAME TestPowerGrid COMMAND TestPowerGrid)
add_executable(TestPowerGrid DataStructures/Graphs/TestPowerGrid.cpp)
target_link_libraries(TestPowerGrid EGOA ${GUROBI_LIBRARIES} gtest gtest_main gmock_main)
add_test(NAME TestPowerGrid COMMAND TestPowerGrid)

# add_executable(TestBlockCutTree DataStructures/Graphs/TestBlockCutTree.cpp)
# target_link_libraries(TestBlockCutTree EGOA ${GUROBI_LIBRARIES} gtest gtest_main gmock_main)
Expand Down
Loading

0 comments on commit 8d8b6c9

Please sign in to comment.