-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
assert: improve assertion error inspection #28058
Closed
BridgeAR
wants to merge
3
commits into
nodejs:master
from
BridgeAR:improve-assertion-error-inspection
Closed
assert: improve assertion error inspection #28058
BridgeAR
wants to merge
3
commits into
nodejs:master
from
BridgeAR:improve-assertion-error-inspection
Conversation
This file contains 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
addaleax
added
assert
Issues and PRs related to the assert subsystem.
blocked
PRs that are blocked by other issues or PRs.
labels
Jun 4, 2019
benjamingr
reviewed
Jun 4, 2019
benjamingr
reviewed
Jun 4, 2019
This makes sure long strings as `actual` or `expected` values on an `AssertionError` won't be logged completely. This is important as the actual value is somewhat redundant in combination with the error message which already logs the difference between the input values.
In some edge cases an identical line could be printed twice. This is now fixed by changing the algorithm a bit. It will now verify how many lines were identical before the current one.
So far consequitive identical lines were collapsed if there were at least three. Now they are only collapsed from five identical lines on. This also simplifies the implementation a tiny bit by abstracting some logic.
BridgeAR
force-pushed
the
improve-assertion-error-inspection
branch
from
June 11, 2019 21:39
e81c0c2
to
97ec3b2
Compare
@nodejs/assert PTAL |
Trott
approved these changes
Jun 11, 2019
BridgeAR
added
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Jun 12, 2019
Landed in f7ffa52...8149656 |
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
Jun 13, 2019
This makes sure long strings as `actual` or `expected` values on an `AssertionError` won't be logged completely. This is important as the actual value is somewhat redundant in combination with the error message which already logs the difference between the input values. PR-URL: nodejs#28058 Reviewed-By: Rich Trott <[email protected]>
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
Jun 13, 2019
In some edge cases an identical line could be printed twice. This is now fixed by changing the algorithm a bit. It will now verify how many lines were identical before the current one. PR-URL: nodejs#28058 Reviewed-By: Rich Trott <[email protected]>
Trott
pushed a commit
to Trott/io.js
that referenced
this pull request
Jun 13, 2019
So far consequitive identical lines were collapsed if there were at least three. Now they are only collapsed from five identical lines on. This also simplifies the implementation a tiny bit by abstracting some logic. PR-URL: nodejs#28058 Reviewed-By: Rich Trott <[email protected]>
BridgeAR
added a commit
that referenced
this pull request
Jun 17, 2019
This makes sure long strings as `actual` or `expected` values on an `AssertionError` won't be logged completely. This is important as the actual value is somewhat redundant in combination with the error message which already logs the difference between the input values. PR-URL: #28058 Reviewed-By: Rich Trott <[email protected]>
BridgeAR
added a commit
that referenced
this pull request
Jun 17, 2019
In some edge cases an identical line could be printed twice. This is now fixed by changing the algorithm a bit. It will now verify how many lines were identical before the current one. PR-URL: #28058 Reviewed-By: Rich Trott <[email protected]>
BridgeAR
added a commit
that referenced
this pull request
Jun 17, 2019
So far consequitive identical lines were collapsed if there were at least three. Now they are only collapsed from five identical lines on. This also simplifies the implementation a tiny bit by abstracting some logic. PR-URL: #28058 Reviewed-By: Rich Trott <[email protected]>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
assert
Issues and PRs related to the assert subsystem.
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
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.
Please have a look at the commit messages for a detailed description. This is based on #28055 and that should land before this PR.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes