Skip to content

Commit

Permalink
Minor unit test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaxmonsky committed Nov 8, 2024
1 parent 56a3e13 commit 5d82ee6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions docs/conversion/walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -735,22 +735,20 @@ Since the file is being built, we don't have to add to this list.

Next we look for `test/unit-test/tests/utilities/CMakeLists.txt` to see if there is a matching test file:

```sh
$ ls cat test/unit-test/tests/utilities/
```bash
$ ls test/unit-test/tests/utilities/
CMakeLists.txt
test_state_converters.pf
$
$ cat test/unit-test/tests/utilities/CMakeLists.txt
add_pfunit_ctest(utilities_tests
TEST_SOURCES test_state_converters.pf
LINK_LIBRARIES utilities
)
$
```

Because there is no matching file or test, we need to create it:

```sh
```bash
$ cat > test/unit-test/tests/utilities/test_physics_tendency_updaters.pf << EOF
@test
subroutine test_pressure_tendency_update()
Expand All @@ -763,7 +761,7 @@ EOF

And add the ability to build/run it from the test harness by updating `test/unit-test/tests/utilities/CMakeLists.txt`:

```
```cmake
add_pfunit_ctest(utilities_tests
TEST_SOURCES test_state_converters.pf test_physics_tendency_updaters.pf
LINK_LIBRARIES utilities
Expand Down

0 comments on commit 5d82ee6

Please sign in to comment.