You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: testing/README.md
+32-7Lines changed: 32 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,35 @@ There are several examples of good unit testing tools for other languages, such
11
11
12
12
These will be used as the basis for what the recommended Fortran unit testing tool should look like. Therefore, key features from these tools shall be individually tested for each Fortran unit testing tool we select to test.
13
13
14
-
## Aims
15
-
- Test multiple fortran unit testing tools to determine which we would recommend. To do this we will
16
-
1.[ ] Create a list of features that should be present in a "good" unit testing tool.
17
-
2.[ ] Write tests to cover each of the key features determined in the previous step.
18
-
-[ ][test-drive](./tests/test-drive)
19
-
-[ ][pFUnit](./tests/pFUnit)
20
-
- Build template implementations for the tools we recommend.
14
+
## Running all of the tests
15
+
16
+
All of the test can be ran from within the build directory with the command `ctest`. However, there is a known issue that the tests for test-drive itself will also be ran, as shown below.
17
+
```sh
18
+
$ ctest
19
+
Test project /Users/connoraird/work/fortran-tooling/build
Copy file name to clipboardExpand all lines: testing/test-drive/README.md
+8-20Lines changed: 8 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,26 +3,14 @@ This project offers a lightweight, procedural unit testing framework based on no
3
3
4
4
## Running the tests
5
5
6
-
The test-drive tests will run with the rest of the [tests](../README.md#running-the-tests) in the repo.
7
-
8
-
There is a known issue that the tests for test-drive itself will also be ran by `ctest` as shown below
6
+
All of the tests written with test-drive can be ran by following [#running all of the tests](../README.md#running-all-of-the-tests). However, we can also run a single testsuite or an individual test directly using the test executable. For example to run the `mesh_generator` tests we can run
9
7
```sh
10
-
$ ctest
11
-
Test project /Users/connoraird/work/fortran-tooling/build
| Can run individual tests | No | Yes, see [main.f90](./main.f90). However, this requires running the test executable directly without ctest. |
34
22
| Mocking | No | Not implemented |
35
23
| Stubbing | No | Not implemented |
36
-
| Data driven tests | No | Yes, see verify_calculate_mesh_parameters and verify_calculate_mesh in [test_mesh_generator.f90](./test_mesh_generator.f90)
24
+
| Data driven tests | No | Yes, but this is very cumbersome. See `verify_calculate_mesh_parameters` and `verify_calculate_mesh` in [test_mesh_generator.f90](./test_mesh_generator.f90)
37
25
| Coverage report | Yes, with fpm | N/A |
38
-
| Skip tests | Yes, see test_skip_example in [test_calc_pi.f90](./test_mesh_generator.f90)| N/A |
26
+
| Skip tests | Yes, see `test_skip_example` in [test_mesh_generator.f90](./test_mesh_generator.f90)| N/A |
39
27
40
28
## Pros
41
29
- Lightweight, procedural unit testing framework based on nothing but standard Fortran.
0 commit comments