示例#1
0
 @NotNull
 public DiffFragment[] buildFragments(
     @NotNull DiffString[] strings1, @NotNull DiffString[] strings2)
     throws FilesTooBigForDiffException {
   DiffFragmentBuilder builder = new DiffFragmentBuilder(strings1, strings2);
   Object[] wrappers1 = getWrappers(strings1);
   Object[] wrappers2 = getWrappers(strings2);
   Diff.Change change = Diff.buildChanges(wrappers1, wrappers2);
   return builder.buildFragments(Util.concatEquals(change, wrappers1, wrappers2));
 }
 private void checkPolicy(DiffPolicy.LineBlocks diffPolicy, String text1, String text2) {
   DiffFragment[] fragments = diffPolicy.buildFragments(text1, text2);
   Assert.assertEquals(text1, Util.getText(fragments, FragmentSide.SIDE1));
   assertEquals(text2, Util.getText(fragments, FragmentSide.SIDE2));
 }