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

[C++]Add more test code in unit test of the Rank type #18

Open
HenryRLee opened this issue Nov 25, 2019 · 0 comments
Open

[C++]Add more test code in unit test of the Rank type #18

HenryRLee opened this issue Nov 25, 2019 · 0 comments

Comments

@HenryRLee
Copy link
Owner

@HenryRLee HenryRLee commented Nov 25, 2019

The unit test in https://github.com/HenryRLee/PokerHandEvaluator/blob/master/cpp/test/rank.cc only covers a small number of cases. Especially the TestRankCategory and TestRankDescription, only a full house and a straight flush appears in the test. I am expecting 3 to 5 hands from each ranking category are covered in the test code. For example, choose 3 hands from the straights, 5 hands from the pairs, etc.

You may refer to the source code in 7462.c, rank.c and rank.h when coding the unit test cases.

PS: When running the unit tests, you can use ./unit_tests --gtest_filter="Rank*" to test only the test cases related to the Rank type, and skip the time-costing enumeration test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.