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 for go InnerOp.CheckAgainstSpec #373

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

colin-axner
Copy link
Contributor

No description provided.

Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

all cases seem cov'ed to me. nice readable test!

Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks @colin-axner!

go/ops_test.go Outdated
"failure: inner op suffix malformed",
func() {
// change spec to be non-iavl spec to skip strict iavl validation
spec.LeafSpec.PrehashKey = HashOp_BITCOIN
Copy link
Member

Choose a reason for hiding this comment

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

Don't think we need to change the hashOp in this testcase here, right?

Is this just for consistency with other testcases where prefix is modified?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are correct! Nice catch! I have removed it now. Ideally that hashOp change wouldn't be in the test cases, but to save some time I decided to use that trick for a few of the more difficult test cases

@colin-axner colin-axner merged commit 22a0173 into master Sep 26, 2024
4 checks passed
@colin-axner colin-axner deleted the colin/test-innerspec-checkagainstspec branch September 26, 2024 08:28
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