Issue #13672: Kill mutation related to Charset in FileText#13728
Issue #13672: Kill mutation related to Charset in FileText#13728romani merged 1 commit intocheckstyle:masterfrom
Conversation
b83efbd to
6dda6cb
Compare
6dda6cb to
029d9e9
Compare
029d9e9 to
3194e92
Compare
|
|
||
| try (OutputStream fileOutputStream = Files.newOutputStream(tempFile)) { | ||
| fileOutputStream.write(0x80); | ||
| fileOutputStream.write(0x80); |
There was a problem hiding this comment.
we need a comment over test method to explain it.
This test exists to make to show how we drop symbols that can not be mapped during loading by some encoding, example of unmapped symbols can be found at https://www.fileformat.info/info/charset/x-IBM1098/decode.htm 0x80, 0x81, 0xCF
or better:
https://www.fileformat.info/info/charset/ISO-8859-6/decode.htm a1 | (unmappable) but mappable at https://www.fileformat.info/info/charset/windows-1251/list.htm Ў CYRILLIC CAPITAL LETTER SHORT U (U+040E) a1
so we can create file that has visual character and it works with one charset and does not work in another charset. We can have single test method that just try run same file two time by different charsets.
There was a problem hiding this comment.
Done, I added Javadoc comments and converted it to a non-temporary input file-based test.
3194e92 to
ff70fa1
Compare
| * | ||
| * @throws Exception exception | ||
| */ | ||
| @SuppressForbidden |
There was a problem hiding this comment.
What is suppress forbidden for?
There was a problem hiding this comment.
Verify method, as we supposed to use verify that use input based config. But we need to set charset, and this type set we do not support yet.
So for now old style testing on Input file, without embedded config.
Issue #13672: Kill mutation related to Charset in FileText
originally discussed at #13181 (comment)
Mutation Covered
checkstyle/config/pitest-suppressions/pitest-api-suppressions.xml
Lines 12 to 28 in 9580515