Skip to content

crypto-square wrong tests #97

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

Closed
celavek opened this issue Jul 27, 2016 · 5 comments
Closed

crypto-square wrong tests #97

celavek opened this issue Jul 27, 2016 · 5 comments
Labels

Comments

@celavek
Copy link

celavek commented Jul 27, 2016

Hi,

I think that the last 2 tests for the crypto-square problem are wrong. You can verify that by
stacking the segment in output of the normalized cipher text which should yield the plaintext in
normalized form:

E.g.

vrela 
epems     ==>     veeorptieeprlmapasoo (far away from truth) 
etpao 
oirpo

Correct

vrel 
aepe 
mset       ==>  vampiresarepeopletoo
paoo 
irpo

Also the following result

msemoa anindn inndla etltsh ui
does not satisfy the property stated in the README

Imperfect squares will have n empty spaces. Those spaces should be distributed evenly across the last n rows.

@arcuru
Copy link
Contributor

arcuru commented Jul 27, 2016

Yea, you're correct on that. It appears everybody in this track just followed the tests and didn't pay much attention to the readme.

Would you like to fix it?

@LegalizeAdulthood
Copy link
Contributor

I shamelessly imitated the JavaScript track while implementing the C++ track 😺

@celavek
Copy link
Author

celavek commented Jul 28, 2016

@patricksjackson OK, I could give it a try. I'm not sure about the time frame as I came across it while implementing the D track and my main focus is right now on that.

@kytrinyx
Copy link
Member

kytrinyx commented Aug 1, 2016

There's a ginormous discussion about this over in the metadata repo: exercism/problem-specifications#190

We have a canonical data set here, I think: https://github.com/exercism/x-common/blob/master/crypto-square.json

@arcuru arcuru added the bug label Jul 15, 2017
@arcuru
Copy link
Contributor

arcuru commented Aug 26, 2017

Oops, this is still an issue. I'm looking into it.

The correct test suite is now located here: https://github.com/exercism/problem-specifications/blob/master/exercises/crypto-square/canonical-data.json

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

No branches or pull requests

4 participants