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

Improve diff output format in TestComparator #668

Merged
merged 3 commits into from
Dec 28, 2020

Conversation

petertrr
Copy link
Member

@petertrr petertrr commented Dec 25, 2020

What's done:

  • Added format for ChangeDeltas

This pull request closes #143

Example of the new format:

[ERROR] 2020-12-25 17:43:18 Expected result from <Example1Expected.kt> and actual formatted are different.
See difference below (for ChangeDelta [text] indicates removed text, <text> - inserted):
[DeleteDelta, position: 3, lines: [    /** Docs */]]
[InsertDelta, position: 18, lines: [     * @param sub]]
[ChangeDelta, position 19, lines: [     */
 <   >fun String.countSubStringOccurrences(sub: String): Int {]]
[ChangeDelta, position 30, lines: [         <   >this.replace("\\", "/").replace("//", "/")]]
[ChangeDelta, position 39, lines: [           < >y: [  ]Int) = x +]]

### What's done:
* Added format for ChangeDeltas
@orchestr7
Copy link
Member

It looks more complex for me and less readable :)

@petertrr petertrr marked this pull request as draft December 25, 2020 14:54
@codecov
Copy link

codecov bot commented Dec 25, 2020

Codecov Report

Merging #668 (4672c0b) into master (9e8d7c1) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #668   +/-   ##
=========================================
  Coverage     79.24%   79.24%           
  Complexity     1803     1803           
=========================================
  Files            87       87           
  Lines          4708     4708           
  Branches       1513     1513           
=========================================
  Hits           3731     3731           
  Misses          280      280           
  Partials        697      697           
Flag Coverage Δ Complexity Δ
unittests 79.24% <ø> (ø) 0.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e8d7c1...4672c0b. Read the comment docs.

Copy link
Member

@orchestr7 orchestr7 left a comment

Choose a reason for hiding this comment

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

lgtm

### What's done:
* Added format for ChangeDeltas
@petertrr petertrr marked this pull request as ready for review December 25, 2020 15:31
@petertrr petertrr merged commit 731b86d into master Dec 28, 2020
@petertrr petertrr deleted the feature/test-framework-output#143 branch December 28, 2020 07:39
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.

Refactor output of FileComparator in test framework
2 participants