-
Notifications
You must be signed in to change notification settings - Fork 6
Add more tests to increase coverage. #14
base: main
Are you sure you want to change the base?
Conversation
newSource: "source_1_b/file_1.txt", | ||
newDiffFile: "f1_b_c.diff", | ||
resultFile: "f1_a_c.diff", | ||
oldSource: "mixed_old_source/f7.txt", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like the same test case as the one from line 98. Also it seems you're not using the new test file mi_f6_os_od.diff anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Um.. yes, actually
mixedModeFileTests used for testing MixedMode and MixedModeFile, while mixedModePathFileTests tests MixedModePath, which includes call to MixedModeFile and MixedMode.
It might be better to totally remove mixedModeFileTests and just test everything with mixedModePathFileTests?
But in that case we won't see directly which of inner function is failing, except from error messages.
* Move check if diff is out of content source to process of unchanged/deleted lines; * Used cmp.Equal in tests; * Add test case with f6; * allow processing empty diff files in MixedModePath; * check number of read diff files instead of handling error on read; * changed NewFileDiffReader to NewMultiFileDiffReader; * add missing colon; * add type to the nil assigment; * corrected calculation of StartLines and NumberOfLines in convertChunksToFileDiff;
Increased coverage from
70%
to87%
.A lot of test files have been replaced to new ones with more understandable names.