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

Update more tests #250

Merged
merged 9 commits into from
Jan 4, 2024
Merged

Update more tests #250

merged 9 commits into from
Jan 4, 2024

Conversation

BNAndras
Copy link
Member

@BNAndras BNAndras commented Jan 1, 2024

Related to #248

@BNAndras BNAndras added x:action/sync Sync content with its latest version x:rep/tiny Tiny amount of reputation labels Jan 1, 2024
@BNAndras BNAndras requested a review from kotp January 1, 2024 01:52
@BNAndras BNAndras changed the title Update tests for allergies, largest-series-product, and run-length-encoding Update more tests Jan 1, 2024
exercises/practice/allergies/allergies.vader Outdated Show resolved Hide resolved
@@ -57,7 +59,7 @@ Execute (detects anagrams using case-insensitive possible matches):
AssertEqual expected, FindAnagrams(candidates, subject)

Execute (does not detect a anagram if the original word is repeated):
let candidates = ['go Go GO']
let candidates = ['goGoGO']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the same word repeated, but a single word with 3 unique letters. It was before this change a single word in three different cases.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you want me to revert? The reimplemented test comes from problem-specifications.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, then I would presume any problem with this would need to be tackled up there. If we have a word "go" and "we have three candidates that are three words "go" "Go" and "GO" then I would say those are not anagrams. But "go" and "goGoGO" would not be an anagram because anagrams have the same number of letters, not because this is two letters of the subject words, and they are repeated. Instead, it is because there are more characters in the proposed anagram than there is in the subject.

I could, of course be totally wrong here, as I am not an anagrammatist.

However, if you suspect that this is going to cause noise and more questions than it raises, we could also forego this test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t know the original intention of the test, but I’m reading it similarly. The candidate should fail because of string length. That’s fairly clear, but a student might assume a candidate containing the subject is an anagram. So they’d fail the test.

You can suggest changes upstream, and we can make a follow-up PR if they’re accepted. There’s no rush to merge this in, but there’s also no compelling reason to sit on this. So I think it’d be simpler to just merge this now.

Copy link
Member

@kotp kotp Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think that at some point, it was 3 words, as in a language with an array or list that looks like this: ['go', 'Go', 'GO'] and it was meant to be three separate words separated with a space, and as a string, rather than one string, one word? I want to make sure it is not a translation problem to a language that is using a string with spacing to differentiate words, rather than individual strings that would often denote words.

So I want to also make sure that perhaps we are not interpreting it (or if programmatically generated) incorrectly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're this uncertain, let's just not include the test since a student looking at the test suite for the first time will definitely be uncertain.

@kotp kotp self-requested a review January 2, 2024 00:37
Copy link
Member

@kotp kotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-approving with the suggestion to remove the <space><space> before the last EOL character.

Edit: Sorry the spaces were not showing in the message due to being processed in the web UI.

exercises/practice/allergies/allergies.vader Outdated Show resolved Hide resolved
Copy link
Member

@kotp kotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me otherwise.

exercises/practice/allergies/allergies.vader Outdated Show resolved Hide resolved
@BNAndras BNAndras merged commit 761f926 into exercism:main Jan 4, 2024
3 checks passed
@BNAndras BNAndras deleted the update-tests branch January 4, 2024 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:action/sync Sync content with its latest version x:rep/tiny Tiny amount of reputation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants