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

Simple Cipher: Add tests for random key generation, 100+ character length - #538

Merged
matthewmorgan merged 1 commit into
exercism:masterfrom
daveyarwood:simple-cipher-random-key-tests
Apr 10, 2018
Merged

matthewmorgan merged 1 commit into
exercism:masterfrom
daveyarwood:simple-cipher-random-key-tests

Conversation

@daveyarwood

Copy link
Copy Markdown
Contributor

See also: this same PR for the typescript track: exercism/typescript#186

The README for this exercise describes generating random keys consisting of 100+ lowercase letters, but the only constraint enforced by the tests is that it must contain only lowercase letters. One could pass this constraint by simply defaulting the key to a hard-coded string like lolnotrandom.

This PR adds tests to enforce that keys are randomly generated (at least a simple test that if you generate 2 keys back to back, they are not the same key), and that they are at least 100 characters long.

@daveyarwood daveyarwood changed the title Simple cipher: Add tests for random key generation, 100+ character length Simple Cipher: Add tests for random key generation, 100+ character length Apr 10, 2018
@matthewmorgan

Copy link
Copy Markdown
Contributor

This is a worthwhile change! Thanks @daveyarwood

@matthewmorgan
matthewmorgan merged commit 025576d into exercism:master Apr 10, 2018
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