ProAlgos / ProAlgos-Cpp

C++ implementations of well-known (and some rare) algorithms, while following good software development practices
MIT License
507 stars 363 forks source link

Unit tests #41

Open faheel opened 7 years ago

faheel commented 7 years ago

Add unit tests for the following programs:

* Ternary search currently has a unit test but it needs to be refactored.

faheel commented 7 years ago

Read about Adding unit tests for C++ code for step-wise directions.

faheel commented 7 years ago

Issue #74 is now closed

alxmjo commented 5 years ago

All of the searching algorithms currently have unit tests, but they don't have a common unit test. However, there is a common test for sorting, which may be useful for implementing a common searching unit test.

alxmjo commented 5 years ago

@faheel Regarding a common test for searching algorithms, is it your belief that this should include ternary search? The interface and use of ternary search differs from the other two existing search algorithms (linear and binary), which makes me wonder if it would be more straightforward to have a common test for binary and linear (and similar algorithms which may be added later) and then a separate test for ternary search. Not as clean as the sorting implementation I added earlier, but maybe a better fit for the objective at hand.

faheel commented 5 years ago

@alxmjo Having a common unit test for linear and binary search and a separate one for ternary search would be best.

ghost commented 4 years ago

Hey, I'd love to give this a crack. Let me know if the issue is still open for any left over algorithms.

alxmjo commented 4 years ago

@safderareepattamannil If you're still interested, we're still missing a common test for searching algorithms. Have a look at the common test for sorting algorithms for an idea of how you might implement it.

beardbytes commented 4 years ago

@alxmjo Hey, I am interested to give it a try !

amrii1 commented 4 years ago

Hello, Is still any unit tests that needs to be done

alxmjo commented 4 years ago

@amrii1 Yes! See the post at the top of the thread. Currently still need a common test for linear and binary search, and then standalone test files for ternary search and radix sort. Please create a new issue if you have questions or would like to discuss implementation. 🙂

faheel commented 3 years ago

@abdulwahab-alobaid-2191115290 The unit tests for searching algorithms have already been added. You can pick up something else if you like.

lydiathiel commented 2 years ago

I'm planning to submit testing for the radix search within a week or two.

Ashu-1309 commented 1 year ago

What I have to do?? Do i have to write code???

srsonia2506 commented 5 months ago

@faheel @alxmjo Would love to do unit test for Radix Sort

faheel commented 5 months ago

A fix for radix sort has been added in #420. Feel free to review the code and run the tests (and suggest new edge cases if any).