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

fix:the expected value has 8 chunks, name test function should reflect that, changing from 7 to 8 #150

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kivi
Copy link

@kivi kivi commented Aug 20, 2023

Seven chunks should be correct.
I am not sure about last two chunks, can the chunk before last one have 7 chars? If so, then this should fix it.

But it is not clear to me reading the instruction of the exercise.

@1ethanhansen
Copy link
Contributor

This comes directly from the problem canonical data. Do you have reason to suspect the canonical data is wrong?

@kivi
Copy link
Author

kivi commented Aug 21, 2023

@1ethanhansen see the name of the test function? It states seven chunks, but the error is, that there are eight chunks expected.

And I guess if I read it correct if would have to make a slight adjustment.

Also instructions state c >= r
I asume r is row and c is character. Also the in the instruction is showing c=8, r=7 and the return value has also 7 chunks.

Or is it the other way around? Then maybe the wording is wrong, or my understanding of chunks is wrong. And c stands for chunks and it's like character length of a word?

So what is that canonical data? If that is wrong, does it have to be fixe in canonical data and imported into this repo?

@kivi
Copy link
Author

kivi commented Aug 22, 2023

@hraftery
Copy link
Contributor

The original expect value is correct, but the description should say "8 chunks".

As described in the problem specification, c is the number of columns and r is the number of rows. Since the chunks (which is a fairly well established term in programming to describe this operation) are taken from the columns, there are c of them, each r long. In the edit suggested in this PR, r is 8 and c is 7, which conflicts with the requirements.

@kivi
Copy link
Author

kivi commented Aug 22, 2023

Not everyone dominates English very well in this world and think about the audience of exercises. I am not sure if chunk is kind of a real word. But anyways. I agree to continue using chunks, but change the number in the name of the test from 7 to 8.

and also reverting to original expect value
@kivi kivi changed the title fix: the expect value to have 7 chunks a 8 chars, last two chunks 7 chars and trailing spaces fix:the expected value has 8 chunks, name test function should reflect that, changing from 7 to 8 Aug 22, 2023
@@ -42,7 +42,7 @@ fn test_8_character_plaintext_results_in_3_chunks_the_last_one_with_a_trailing_s
assert ciphertext(phrase) == expect
}

fn test_54_character_plaintext_results_in_7_chunks_the_last_two_with_trailing_spaces() {
fn test_54_character_plaintext_results_in_8_chunks_the_last_two_with_trailing_spaces() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm hesitant to change this without the source problem specifications changing. Could you also open a PR to change the description on problem-specification and tag meplease? Then I'll be happy to merge this in!

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

Successfully merging this pull request may close these issues.

None yet

3 participants