Fix ScriptNum Tests#22786
Closed
fpelliccioni wants to merge 1 commit intobitcoin:masterfrom
Closed
Conversation
| RunOperators(a, -a); | ||
| RunOperators(a, b); | ||
| RunOperators(a, -b); | ||
| RunOperators(a + b, b); |
Contributor
There was a problem hiding this comment.
I suspect these should have been of the form value + offset rather than value + value
Contributor
Contributor
rajarshimaitra
left a comment
There was a problem hiding this comment.
Concept ACK on code change. Seems cleaner.
But I am confused. This doesn't seem to address the issues mentioned in the PR description. Only the modernization.
Can you explain what did you mean by "it's not checking what it intends to check"?
Member
|
I'm also a bit confused here. What is the intent of the original code, what changed here. Next time, please separate out "modernization" from fixes into separate commits at least (it's fine to have them in the same PR). |
Member
|
Closing this for now. Please let me know if you intend to continue work on this and address the comments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
At first glance the test
scriptnum_tests/operatorshas some issues:size(offsets) > size(values)the test program will crash.I also took the opportunity to modernize the
scriptnum_tests/creationcode, but the semantics of the new code should be equivalent to that of the previous code.Test Plan
./src/test/test_bitcoin -t scriptnum_tests/operators./src/test/test_bitcoin -t scriptnum_tests/creation