Skip to content

add exercise circular-buffer#52

Merged
EduardoBautista merged 1 commit intoexercism:masterfrom
ekse:exercise-circular-buffer
Oct 10, 2015
Merged

add exercise circular-buffer#52
EduardoBautista merged 1 commit intoexercism:masterfrom
ekse:exercise-circular-buffer

Conversation

@ekse
Copy link
Copy Markdown
Contributor

@ekse ekse commented Oct 8, 2015

The tests were ported from the Ruby version, the example implementation is similar to the Go example.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe could add a test for using overwrite in a non-full buffer too (like in Ruby) - create with size 2, write 1, overwrite 2, read should return 1 instead of 2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good point, I will add this test tonight.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added the test. I actually had a bug in there due to a typo, oopsies.

@EduardoBautista
Copy link
Copy Markdown
Contributor

We don't usually include the lib.rs file. Must have gotten accepted by accident in the "forth" exercise.

@ekse
Copy link
Copy Markdown
Contributor Author

ekse commented Oct 9, 2015

I can remove it, the reason I included was to provide the Error enum definition.

@EduardoBautista
Copy link
Copy Markdown
Contributor

@ekse I don't think it's too unreasonable to expect the Enum to be defined as a part of the exercise. If you can remove it, please do.

@ekse
Copy link
Copy Markdown
Contributor Author

ekse commented Oct 10, 2015

I removed the lib.rs, I also merged the commits together.

@EduardoBautista
Copy link
Copy Markdown
Contributor

Looks good to me! Thanks!

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.

3 participants