TopoToolbox / TopoToolbox/libtopotoolbox
Add tests for Graphflood
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
@bgailleton As discussed in #80, we should have some tests to make sure Graphflood works as expected.
We use CTest to run the tests, so each test is an executable declared in test/CMakeLists.txt. There is a fair amount of boilerplate in there that we should really try to reduce at some point, but you should be able to copy the declaration from either random_dem or excesstopography if you have a C/C++ executable to build and run.
If the test executable runs to completion and exits with a 0 exit code, it is a success, so you can throw exceptions or exit with a failure code to signal a test failure.. It is probably easiest to add your own Graphflood executable, but we do have a test harness in random_dem.cpp for generating random DEMs and running the various libtopotoolbox functions.
Our testing setup has grown very organically, so it is not the easiest thing to deal with. If there is anything that would make it easier, let me know here or mention it in #55.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test/CMakeLists.txt and the test declaration for random_dem or excesstopography, then inspect test/random_dem.cpp for the existing harness. Add a Graphflood test executable and register it with CTest; done means it runs to completion and exits with code 0, while failures signal through an exception or nonzero exit code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake, cpp
- Domain
- build-system, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100