Skip to content

Commit 0a3fa95

Browse files
Merge branch 'main' into feature/auto-tap-changer-skeleton
2 parents 389457f + ffa1dc8 commit 0a3fa95

File tree

13 files changed

+41
-8
lines changed

13 files changed

+41
-8
lines changed

build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ if [[ "${COVERAGE}" ]]; then
6868

6969
PATH=${PATH}:${PWD} lcov -q -c \
7070
-d ${BUILD_DIR}/tests/cpp_unit_tests/CMakeFiles/power_grid_model_unit_tests.dir \
71+
-d ${BUILD_DIR}/tests/cpp_integration_tests/CMakeFiles/power_grid_model_integration_tests.dir \
72+
-d ${BUILD_DIR}/tests/cpp_validation_tests/CMakeFiles/power_grid_model_validation_tests.dir \
7173
-d ${BUILD_DIR}/tests/c_api_tests/CMakeFiles/power_grid_model_c_api_tests.dir \
7274
-d ${BUILD_DIR}/power_grid_model_c/power_grid_model_c/CMakeFiles/power_grid_model_c.dir \
7375
-b . \
@@ -82,7 +84,7 @@ fi
8284
if [[ ${INSTALL} ]]; then
8385
cmake --build --preset ${PRESET} --target install
8486

85-
# integration test
87+
# end-to-end test
8688
if [[ ${INTEGRATION_TEST} ]]; then
8789
cd tests/package_tests
8890
cmake --preset ${PRESET}

docs/advanced_documentation/build-guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ library `power_grid_model`. There are four sub-projects defined in the root cmak
118118

119119
* `power_grid_model_c`: a dynamic library (`.dll` or `.so`) with stable pure C API/ABI which can be used by any application
120120
* `tests/cpp_unit_tests`: the unit test target for the C++ core using the `doctest` framework.
121-
* `tests/c_api_tests`: the C API test target using the `doctest` framework
121+
* `tests/cpp_integration_tests`: the integration test target for the C++ core using the `doctest` framework.
122122
* `tests/cpp_validation_tests`: the validation test target using the `doctest` framework
123+
* `tests/c_api_tests`: the C API test target using the `doctest` framework
123124
* `tests/benchmark_cpp`: the C++ benchmark target for performance measure.
124125
* `power_grid_model_c_example`: an example C program to call the dynamic library
125126

docs/contribution/folder-structure.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ The repository folder structure is as follows. The `docs` and `scripts` folders
1515
- The code for validation of input data is in {{ "[validation]({}/src/power_grid_model/validation)".format(gh_link_head_tree) }} folder.
1616
- The {{ "[tests]({}/tests)".format(gh_link_head_tree) }} folder is divided in the following way:
1717
- `cpp_unit_tests` contains the tests for the C++ calculation core.
18+
- `cpp_integration_tests` contains more extensive tests for the C++ calculation core.
19+
- `cpp_validation_tests` contains the validation test cases for the C++ calculation core.
1820
- `c_api_tests` contains the tests for communication with the C API.
1921
- `benchmark_cpp` contains a benchmark test case generator in C++.
2022
- `package_tests` contains an integration test CMake project that tests whether the C API package is correctly installed.

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sonar.projectVersion=1.0
1111

1212
# include C++ and Python source file
1313
# since the C++ part is header only, also include the C++ unit test .cpp file
14-
sonar.sources=src,tests/cpp_unit_tests,tests/c_api_tests,power_grid_model_c
14+
sonar.sources=src,tests/cpp_unit_tests,tests/cpp_integration_tests,tests/cpp_validation_tests,tests/c_api_tests,power_grid_model_c
1515
sonar.tests=tests/unit
1616
sonar.sourceEncoding=UTF-8
1717

tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ include("${doctest_DIR}/doctest.cmake")
88

99
add_subdirectory("c_api_tests")
1010
add_subdirectory("cpp_unit_tests")
11+
add_subdirectory("cpp_integration_tests")
1112
add_subdirectory("cpp_validation_tests")
1213
add_subdirectory("benchmark_cpp")
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
5+
set(PROJECT_SOURCES
6+
"test_entry_point.cpp"
7+
"test_main_model_sc.cpp"
8+
"test_main_model_se.cpp"
9+
"test_main_model.cpp"
10+
"test_main_model_static.cpp"
11+
"test_math_solver.cpp"
12+
)
13+
14+
add_executable(power_grid_model_integration_tests ${PROJECT_SOURCES})
15+
16+
target_link_libraries(power_grid_model_integration_tests
17+
PRIVATE
18+
power_grid_model
19+
doctest::doctest
20+
nlohmann_json nlohmann_json::nlohmann_json
21+
)
22+
23+
doctest_discover_tests(power_grid_model_integration_tests)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>
2+
//
3+
// SPDX-License-Identifier: MPL-2.0
4+
5+
// main cpp file
6+
7+
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
8+
9+
#include <doctest/doctest.h>
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)