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

History object tests #4314

Merged
merged 2 commits into from
Mar 1, 2021
Merged

History object tests #4314

merged 2 commits into from
Mar 1, 2021

Conversation

acpaquette
Copy link
Collaborator

@acpaquette acpaquette commented Feb 24, 2021

Adds history object tests for updated history object

Description

Updates the old history object tests to a gtest and tests the new functionality of the history object

Related Issue

N/A

Motivation and Context

Blob refactor and IO improvements

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation change (update to the documentation; no code change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read and agree to abide by the Code of Conduct
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have added myself to the .zenodo.json document.
  • I have added any user impacting changes to the CHANGELOG.md document.

Licensing

This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words:

This work is free and unencumbered software released into the public domain. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain.

  • I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

Copy link
Contributor

@jessemapel jessemapel left a comment

Choose a reason for hiding this comment

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

Just minor comments. Make sure that you delete the old unit test. It looks to be just commented out anyway.

isis/tests/Fixtures.h Outdated Show resolved Hide resolved
for (int i = 0; i < blob->Size(); i++) {
os << blob_buffer[i];
}
os >> newHistoryPvl;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't interrogate the Blob itself, I would just test History -> Blob -> History works correctly.

Copy link
Collaborator Author

@acpaquette acpaquette Feb 24, 2021

Choose a reason for hiding this comment

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

Maybe? That's testing a lot in one test, which is why I thought chunking the test up would be better.

It seems like we either test all of the functionality of the class in one test that is an end to end test, or we chunk it up like I have. In the end to end test you would use the default constructor, the AddEntry method, the toBlob method, the blob constructor and the ReturnHist method to examine the expect PVL

@jessemapel jessemapel merged commit de2a88d into DOI-USGS:blob Mar 1, 2021
jessemapel added a commit that referenced this pull request Mar 9, 2021
* Updated to new blob structure

* Clean up after being able to look at all of the changes at once

* Changed the history read to return a history object rather than a pointer

* Addressed PR feedback

* Imagepolygon Update (#4308)

* Converted Imagepolygon to no longer be a subclass of blob

* Updated Imagepolygon with constructor chaining

* Fixed error message

* Refactor OriginalLabel class to remove inheritance from Blob (#4309)

* Initial refactor of OriginalLabel class

* Addressed PR feedback

* Fixed error message

Co-authored-by: Jesse Mapel <[email protected]>

* Modified Table to not inherit from Blob anymore (#4312)

* Ported Table test to gtest

* Table refactor

* Fixed merge issue

* Fixed merge issues

* Removes blob inheritance from OriginalXmlLabel (#4316)

* Initial refactor of OriginalLabel class

* Addressed PR feedback

* Fixed error message

* Remove blob inheritance from originalxmllabel

* Removed commented / old code

* Added byte order specification

* History object tests (#4314)

* Adds History object tests

* Updated blob tests to use a non-pointer variable

* Removed gisblob from isis (#4329)

* Removed blob inheritance from stretchblob (#4331)

* Removed blob inheritance from stretchblob

* Addressed feedback + working read/write

* Updated cubestretch with the stretch blob functionality

* Removed stretchBlob and updated cubestretch/cube with read write functionality

* Replaced readStretchBlob with readCubeStretch

* Fixed segfault

* Removed debug print statements

* Added check for existence of OriginalLabel before attempting to propagate

* Addressed PR feedback

Co-authored-by: Adam Paquette <[email protected]>

* Removed StringBlob Class (#4321)

* Converted StringBlob

* Removed StretchBlob class

* Changed Blob setData to copy

* Added csminit change and docs

* Removed old memcopy

* History Blob Old Implementation (#4342)

* Implemented old history functionality

* Removed old history unit test

* Fixed original label reading

* Fixed Blob branch test failures (#4344)

* Fixed test failures

* More clean-up

* Fixed marci2isis test

* Blob final clean-up (#4346)

* Redid Blob writing

* Added docs

* Review feedback

* Fixed int comparison

Co-authored-by: Adam Paquette <[email protected]>
Co-authored-by: AustinSanders <[email protected]>
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