Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create unit tests from examples #67

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Create unit tests from examples #67

wants to merge 3 commits into from

Conversation

s-martin
Copy link
Owner

@s-martin s-martin commented Oct 17, 2024

Add functions objective and exampleXX to examples/ex6.hpp and examples/ex8.hpp to calculate the objective value and run the examples with seed and command line options as input parameters.

Modify test/GAExamplesTest.cpp to add unit tests for examples 6 and 8 using the new example6 and example8 functions, and update existing unit tests to use the new functions.

Remove main methods from examples/ex6.C, examples/ex8.C, examples/ex1.C, examples/ex2.C, examples/ex3.C, examples/ex4.C, examples/ex7.C, examples/ex9.C, and move their content to the corresponding exampleXX functions in the respective header files.

Add functions objective and exampleXX to examples/ex1.hpp, examples/ex2.hpp, examples/ex3.hpp, examples/ex4.hpp, examples/ex7.hpp, examples/ex9.hpp to calculate the objective value and run the examples with seed and command line options as input parameters.


For more details, open the Copilot Workspace session.

Add functions `objective` and `exampleXX` to `examples/ex6.hpp` and `examples/ex8.hpp` to calculate the objective value and run the examples with seed and command line options as input parameters.

Modify `test/GAExamplesTest.cpp` to add unit tests for examples 6 and 8 using the new `example6` and `example8` functions, and update existing unit tests to use the new functions.

Remove main methods from `examples/ex6.C`, `examples/ex8.C`, `examples/ex1.C`, `examples/ex2.C`, `examples/ex3.C`, `examples/ex4.C`, `examples/ex7.C`, `examples/ex9.C`, and move their content to the corresponding `exampleXX` functions in the respective header files.

Add functions `objective` and `exampleXX` to `examples/ex1.hpp`, `examples/ex2.hpp`, `examples/ex3.hpp`, `examples/ex4.hpp`, `examples/ex7.hpp`, `examples/ex9.hpp` to calculate the objective value and run the examples with seed and command line options as input parameters.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/s-martin/galib?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

github-actions bot commented Oct 17, 2024

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 21d5819. ± Comparison against base commit 8be6c94.

♻️ This comment has been updated with latest results.

…1.hpp`

* Include `ex1.hpp` header file
* Replace call to `ex1()` with `example1(argc, argv)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant