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

Using dropRight instead of tail for shortening BytesSpec array #510

Merged
merged 2 commits into from
Feb 22, 2016

Conversation

jnievelt
Copy link
Contributor

A truncated array is only guaranteed to compare as less if the truncation happens at the end. Also we should be able to compare an empty Array so I'm not excluding the case where length == 1.

I've verified this by testing with a "\0" prefix on the random string (which makes the original code fail consistently).

Also testing empty arrays here.

Recreates #504
Fixes #503

Gabriella439 added a commit that referenced this pull request Feb 22, 2016
Using dropRight instead of tail for shortening BytesSpec array
@Gabriella439 Gabriella439 merged commit 849051c into develop Feb 22, 2016
@johnynek johnynek deleted the jnievelt/503 branch February 23, 2016 03:02
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.

BytesSpec fails Ordering property test
2 participants