Skip to content

Conversation

@BridgeAR
Copy link
Member

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@addaleaxaddaleax added assert Issues and PRs related to the assert subsystem. blocked PRs that are blocked by other issues or PRs. labels 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.
@BridgeARBridgeARforce-pushed the improve-assertion-error-inspection branch from e81c0c2 to 97ec3b2CompareJune 11, 2019 21:39
@BridgeARBridgeAR removed the blocked PRs that are blocked by other issues or PRs. label Jun 11, 2019
@BridgeAR
Copy link
MemberAuthor

@nodejs/assert PTAL

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Jun 11, 2019

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 12, 2019
@Trott
Copy link
Member

Landed in f7ffa52...8149656

@TrottTrott closed this Jun 13, 2019
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]>
@BridgeARBridgeAR mentioned this pull request Jun 17, 2019
@BridgeARBridgeAR deleted the improve-assertion-error-inspection branch January 20, 2020 12:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assertIssues and PRs related to the assert subsystem.author readyPRs that have at least one approval, no pending requests for changes, and a CI started.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@BridgeAR@nodejs-github-bot@Trott@benjamingr@addaleax