Skip to content

Commit 95c9962

Browse files
committed
Update demo notes BOOST UTF in preCICE
1 parent e418342 commit 95c9962

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

05_testing_and_ci/boost_testing_precice_demo.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ Look around preCICE in the terminal + text editor.
1010
- Imports `testing/Testing.hpp`, there we handle UTF imports
1111
- Test suite for `math` namespace and test suite per file (here `math/differences.hpp`)
1212
- `BOOST_CHECK` actually not recommended to use. Is used internally by `BOOST_TEST`.
13-
- Powerful macro `PRECICE_TEST(1_rank)`; here it means that this test is run on one MPI rank
14-
- Tests are normally run on 4 MPI ranks to test parallel implementation and to mimic different coupled solvers
13+
- Powerful macro `PRECICE_TEST()` to setup test context (resources, singletons, not data)
1514

1615
## Unit vs. Integration Tests
1716

1817
- Clear separation in preCICE: integration tests only directly use API of preCICE.
1918
- They are located in `tests` folder.
20-
- Look at `tests/serial/initialize-data/Explicit.cpp`
21-
- Explain `PRECICE_TEST` and how it is used
19+
- Look at `tests/serial/initialize-data/Explicit.cpp`:
20+
- Explain `PRECICE_TEST_SETUP` and how it is used: test is run on two MPI ranks living in seperate MPI communicators.
21+
- Information can be accessed via `context`.
2222
- More information: [blog post on bssw.io on multiphysics testing](https://bssw.io/blog_posts/overcoming-complexity-in-testing-multiphysics-coupling-software)
2323

2424
## White-Box Testing
@@ -34,18 +34,18 @@ Look around preCICE in the terminal + text editor.
3434
- Has public and private members. We want to check the private members in tests.
3535
- Does not `friend` every test, but only `WaveformFixture`
3636
- `src/testing/WaveformFixture.hpp` has functions to access private members
37-
- This fixture is used in many tests in `src/time/tests/WaveformTests`
37+
- This fixture is used in many tests in `src/time/tests/WaveformTests` (but not handed over to test like normal UTF fixtures)
3838

3939
## Test Matrices
4040

4141
- Look at `tests/serial/mapping-nearest-projection/QuadMappingDiagonalNearestProjectionEdgesTallKite.cpp`:
4242
- Define test matrix with data sets: `boost::unit_test::data::make`
4343

44-
## Test Context
44+
## Boost Test Context
4545

4646
- Look at `src/mapping/tests/NearestProjectionMappingTest.cpp`:
4747
- `BOOST_TEST_CONTEXT` outputs context information on failure
4848

4949
## CMake
5050

51-
- Look at `cmake/CTestConfig.cmake`: More things tested than only UTF
51+
- Look at `cmake/CTestConfig.cmake`: Complicated, but more things tested than only UTF (search for `add_test`)

0 commit comments

Comments
 (0)