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

UniqueVessels does not rewind the file pointer #35

Closed
zacsketches opened this issue Dec 28, 2018 · 1 comment
Closed

UniqueVessels does not rewind the file pointer #35

zacsketches opened this issue Dec 28, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@zacsketches
Copy link
Contributor

After a call to rs.UniqueVessels the file pointer in the RecordSet reader has already reached io.EOF and any further calls to the Reader do not behave as expected. Users may want to call UniqueVessels and see if a particular vessel is present in the data, and then use the set for additional operations that fail because the pointer needs be reset.

@zacsketches zacsketches added the bug Something isn't working label Dec 28, 2018
@zacsketches zacsketches self-assigned this Dec 28, 2018
zacsketches added a commit that referenced this issue Dec 28, 2018
Prep work for issue #35

Increases code coverage to 41% by covering the UniqueVessles method
of a RecordSet.  This gives a good base to ensure that fixes to
issue #35 don't introduce new reression bugs.
zacsketches added a commit that referenced this issue Dec 28, 2018
Corrects issue #35

Main changes are contained in the RecordSet.UniqueVessels() function
where a buffer was created to keep track of the state of the Reader
before it was read until EOF by the function.  Then the pointer for
the RecordSet is pointed at this new copy upon exiting the function.
Test coverage was also added to ensure this new functionality did not
cause breaking changes.

Regression testing revealed that changes were necessary to the
Record.Data() function in order to accurately reflect the way bytes are
written in a CSV record.  This in turn caused a breakage in the
Track testing functions which was also corrected.
zacsketches added a commit that referenced this issue Dec 28, 2018
This merge corrects issue #35.  Unique Vessels can be called multiple
times in a row with repeatable results on a RecordSet.
@zacsketches
Copy link
Contributor Author

Issue closed by commit 6993f81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant