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.
As part of a research project at the University of Waterloo, we are exploring automatic test refactoring tools and submitting vetted proposed refactorings upstream. These refactorings make it easier to add additional related tests and should help with the maintainability of the tests.
These are all automated refactorings, but we have checked every case and made sure that all the test cases still pass successfully.
If it helps, we can also propose a test case that uses these refactored methods. We explained each of the four refactoring cases briefly below.
Test method pair "testRead_partialArray()" and "testRead_partialArray_sliceLarger()" only differ in an int value (8 vs 10). We create parametrized "jimfsInputStreamTestTestRead_partialTemplate(int i1)" method, which allows you to add similar test cases with different argument i1.
Test method pairs "testNormalizeNfc_pattern()" and "testNormalizeNfd_pattern()", and "testNormalizeNfcCaseFoldAscii_pattern()" and "testNormalizeNfdCaseFoldAscii_pattern()", only differ in a PathNormalization (NFC vs NFD). We create parametrized "pathNormalizationTestTestNormalizeCaseFoldAscii_patternTemplate(PathNormalization pathNormalization1)" and "pathNormalizationTestTestNormalizeTemplate(PathNormalization pathNormalization1)" methods.
Test method pair "testWindows_relativePathsWithDriveRoot_unsupported()" and "testWindows_absolutePathOnCurrentDrive_unsupported()" only differ in two strings ("C:" vs "\foo\bar" and "C:foo\bar" vs "\"). We create parametrized "public void windowsPathTypeTestTestTemplate(String string1, String string2)" method.