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

test: Add unit tests #14

Merged
merged 4 commits into from
Jan 24, 2023
Merged

test: Add unit tests #14

merged 4 commits into from
Jan 24, 2023

Conversation

ev3nvy
Copy link
Owner

@ev3nvy ev3nvy commented Jan 5, 2023

This PR adds unit tests for FileHeader and ManifestFile. It also adds a build script, which can build manifest files. Those are then used in unit tests, and will also be able to be used in doc tests.

@ev3nvy ev3nvy added status: in progress This is being worked on type: test Missing/flaky tests labels Jan 5, 2023
@ev3nvy ev3nvy added this to the v0.1.0 milestone Jan 5, 2023
@ev3nvy ev3nvy force-pushed the add-unit-tests branch 3 times, most recently from 9cb78c6 to 3007ed5 Compare January 20, 2023 20:45
@ev3nvy ev3nvy changed the title Add unit tests test: Add unit tests Jan 22, 2023
Added tests that check:
- if valid headers do indeed parse sucessfully,
- if correct values are stored into the FileHeader struct,
- if correct error is thrown when file ends unexprectedly,
- that the header data is not completely incorrect.
This build script generates .manifest files used in tests and doc
tests.

Currently it generates two files:
  - `valid.manifest` - this is a pretty minimal valid manifest file,
  - `valid_empty.manifest` - this is a valid manifest file with empty
  vectors.

Building more manifests may be added once/if I think of additional
different cases we should test.
@ev3nvy
Copy link
Owner Author

ev3nvy commented Jan 24, 2023

This seems fine for now tbh. More tests will be added as issues arise.

@ev3nvy ev3nvy merged commit 2b76bc6 into develop Jan 24, 2023
@ev3nvy ev3nvy deleted the add-unit-tests branch January 24, 2023 23:34
@ev3nvy ev3nvy added status: completed Issue was resolved, or pull request was merged and removed status: in progress This is being worked on labels Jan 24, 2023
@ev3nvy ev3nvy mentioned this pull request Feb 5, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: completed Issue was resolved, or pull request was merged type: test Missing/flaky tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant