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

Unit tests #41

Open
6 of 8 tasks
faheel opened this issue Apr 4, 2017 · 15 comments
Open
6 of 8 tasks

Unit tests #41

faheel opened this issue Apr 4, 2017 · 15 comments

Comments

@faheel
Copy link
Member

faheel commented Apr 4, 2017

Add unit tests for the following programs:

  • N-Queens
  • Kadane
  • LCS
  • KMP
  • Searching
    • Common test for linear search and binary search
    • Ternary search*
  • Sorting
    • Common test
    • Radix sort

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

@faheel
Copy link
Member Author

faheel commented Jul 6, 2017

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

@faheel
Copy link
Member Author

faheel commented Jul 21, 2017

Issue #74 is now closed

@faheel faheel pinned this issue Jun 2, 2019
@alxmjo
Copy link
Collaborator

alxmjo commented Jun 25, 2019

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
Copy link
Collaborator

alxmjo commented Jul 30, 2019

@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
Copy link
Member Author

faheel commented Jul 30, 2019

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

@ghost
Copy link

ghost commented Jan 5, 2020

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

@alxmjo
Copy link
Collaborator

alxmjo commented May 7, 2020

@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
Copy link

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

@amrii1
Copy link

amrii1 commented Aug 5, 2020

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

@alxmjo
Copy link
Collaborator

alxmjo commented Aug 5, 2020

@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
Copy link
Member Author

faheel commented Jul 26, 2021

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

@lydiathiel
Copy link

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

@Ashu-1309
Copy link

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

@srsonia2506
Copy link

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

@faheel
Copy link
Member Author

faheel commented Apr 10, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants