Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

normalizeCiphertext corrected grouping size #41

Merged
merged 2 commits into from
Sep 13, 2014
Merged

Conversation

glebec
Copy link
Contributor

@glebec glebec commented Sep 13, 2014

The previous spec is inconsistent in how it tests output strings. plaintextSegments tested for output based on square size, e.g. a 26-character input resulted in output of groups of 6 with a group of 2 left over. normalizeCiphertext however always expected groups of 5. Edited so normalizeCiphertext now follows the same pattern as plaintextSegments, which should generate less confusion for people attempting to interpret the spec.

As a corollary, updated the example.js to match and pass spec. Also, replaced double quotes with single quotes.

The previous spec was inconsistent in how it tested output strings. plaintextSegments tested for output based on square size, e.g. a 26-character input resulted in output of groups of 6 with a group of 2 left over. normalizeCiphertext however always expected groups of 5. Corrected so normalizeCiphertext follows the same pattern as plaintextSegments.

Also updated the example.js to match.
@kytrinyx
Copy link
Member

This definitely seems easier to understand. Thank you!

kytrinyx added a commit that referenced this pull request Sep 13, 2014
normalizeCiphertext corrected grouping size
@kytrinyx kytrinyx merged commit fbfe71c into exercism:master Sep 13, 2014
@glebec
Copy link
Contributor Author

glebec commented Sep 13, 2014

Happy to help. 👍

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

Successfully merging this pull request may close these issues.

2 participants