-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Update anagram tests #784
Update anagram tests #784
Conversation
Hey, thanks for the PR. Do I understand correctly, that you updated the toml-file to reflect the current state of the tests and rewrote the tests to the format, that is outlined in the wiki? If yes: would you be able to add the missing test cases as well? |
Yep! I got configlit to sync and update the toml and then made the changes. How do you mean missing tests? I took out the non included ones and added the new versions. Do you mean add the uuid's to the pre existing tests? |
The TOML file is metadata about the unit tests. The unit tests list in the cpp test file. Any changes to the TOML files should have a corresponding change in the test.cpp file. |
Got it that's what I did, got the changes to sync then updated the cpp test file. Sorry for the imprecise wording I did no manual changes to the TOML I meant made changes to the cpp test file. |
I am not sure we mean the same thing. Our goal for the track is to implement every test from the problem-specification as a single test case. Unless there is a good reason to skip certain tests, this goal is not yet fulfilled for your implementation. In your test,cpp file some cases are missing their uuid. |
Gotcha so even when it says [a0705568-628c-4b55-9798-82e4acde51ca] the test should be included. I assumed it meant include the newer version and skip the old version I'll put the old version back. I added the UUID for the new tests I'll put them in for the old tests as well. |
If it says |
should I put the tests back in that say 'include = false' ? |
Looking at the canonical cases,
That's the list of not-reimplemented test cases which ought to show up in the test file. I noticed some of the It looks like the test code in the PR does have all the expected test cases expect the last two which were recently added with |
The problem spec has 22 test cases but 6 are reimplemented so only 16 ought to show up. |
I added the uuid's but not the 'include = false' tests I can add those if needed pls let me know. |
Yes, please include all the tests even the "false" ones if you can. Edit: this might be wrong, please ignore for the time being. |
In the |
Sorry, I need to look into the 'false'. all the way. I was not aware of the implementation. We do need to discuss the unicode thing though. |
got it added all tests |
@@ -34,12 +46,41 @@ description = "detects anagrams using case-insensitive possible matches" | |||
|
|||
[7cc195ad-e3c7-44ee-9fd2-d3c344806a2c] | |||
description = "does not detect an anagram if the original word is repeated" | |||
include = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vaeng Should this test be included in the C++ unit test file or not?
The canonical data says it's superseded and this line of tests.toml
says it's not included, but the unit test file now includes it.
@CadeMichael I am sorry for the confusion. I have not seen that some tests are not supposed to be included in the tests, as they are updated. I first thought you had added the You were right not including them. Thanks for adding all the uuids. For the failing tests, we have to update the catch version. At least I think that this is the issue. Unique names are not required for catch2, as long as the tags are different. |
Catch2 v3 changes run fine on my machine, but make problems in the CI. I see two ways:
I have touched on the subject of the latter alternative with @siebenschlaefer in a private conversation. |
Reversing a Unicode string correctly without a library is nearly impossible, unless you only want to handle some basic/simple cases. We could include ICU in our docker image but I'd vote against it. Proper Unicode handling would make this a different exercise, and a much harder one. |
I also vote to not include unicode tests. The correct way would be to have an |
Yup. This would be where you'd set that manually. |
Alright I will remove the include false tests and the unicode tests and add include = false to those. The commit will be in within 5 min of this comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the work!
Followed the guide for updating testcases, using configlet to sync test.toml and making the updates in the testfile.