Skip to content

Commit

Permalink
More testing
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Jan 7, 2025
1 parent 9092c20 commit 8292e3d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
- name: C++ info
run: g++ -v

- name: Run C++ tests
run: |
make tests
./tests
- name: Test makefile
run: make

Expand Down
6 changes: 6 additions & 0 deletions tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ int main (int argc, const char* argv[])
assert(clip(0, -1, 1) == 0);
assert(clip(0, 1, 1) == 1);

std::cout << MapSearchParameter(-1, 0, 10, -1.0e99, 1.0e99) << std::endl;

assert( MapSearchParameter(-1, 0, 10) == 0);
assert( MapSearchParameter(1, 0, 10) == 10);
assert( MapSearchParameter(1, 0, 10, -5,5) == 5);

std::cout << "Done!" << std::endl;

return 0;
Expand Down

0 comments on commit 8292e3d

Please sign in to comment.