Repository navigation
Write 54 verify scripts as assertions - #1421
Merged
Merged
Conversation
They read a file and checked indexOf, printing a message and returning false on a mismatch. An assert with the same message also reports the expression and the value that failed. Part of #1414.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #1414. 54 verify scripts read a file, looked for a string with
indexOfand on a mismatch printed a message and returnedfalse, inside atrythat turned any exception intofalseas well. They are now oneassertper check with the original message, so a failure shows the expression and the value, and an exception surfaces with its stack trace instead of a barefalse. The checks and their encodings are unchanged;indexOf(x) < 0becamecontains(x)andindexOf(x) >= 0or> 0became!contains(x).The conversion was scripted and only touched scripts that consist of nothing else. The remaining 36 old-style scripts use regular expressions, the build log or the HTML reports and get a separate PR.
Verified: the 54 ITs with
mvn -P run-its verify -Dinvoker.test=โฆโ all pass (it-rules-via-classpath-003together withsetup-provide-rules-in-jar); changing the expected value init-resolve-ranges-002fails withAssertionError: Version of api not resolved to 2.0. Expression: buf.contains(<api>9.9</api>)