File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,15 @@ public void doit() throws IOException {
59
59
60
60
System .out .println ("Diff command executed " + all .size ());
61
61
System .out .println ("Reference result: " + run1 );
62
- System .out .println ("Compared result: " + run2 );
63
62
64
63
// for (Cmp cmp : all.values())
65
64
// if (cmp.bothPresent() && cmp.isSame() == false)
66
65
// System.out.println(cmp);
67
66
68
67
final Path outHtml = Paths .get (run1 + "-" + run2 + ".html" );
69
68
70
- new HtmlDiff (outHtml , dbCollection .getMinimalPrefix (), all .values ());
69
+ final HtmlDiff htmlDiff = new HtmlDiff (outHtml , dbCollection .getMinimalPrefix (), all .values ());
70
+ System .out .println ("same=" + htmlDiff .getSame () + " diff=" + htmlDiff .getDiff ());
71
71
72
72
}
73
73
}
Original file line number Diff line number Diff line change 10
10
import com .pdiff .core .DbFileAfterRun ;
11
11
12
12
public class HtmlDiff {
13
+
14
+ private int same = 0 ;
15
+ private int diff = 0 ;
13
16
14
17
public HtmlDiff (Path outHtml , int minimalPrefix , Collection <Cmp > cmps ) throws IOException {
15
18
@@ -163,8 +166,11 @@ def on_input(event):
163
166
for (Cmp cmp : cmps ) {
164
167
if (cmp .bothPresent () == false )
165
168
continue ;
166
- if (cmp .isSame ())
169
+ if (cmp .isSame ()) {
170
+ same ++;
167
171
continue ;
172
+ }
173
+ diff ++;
168
174
169
175
final DbFileAfterRun run1 = cmp .getRun1 ();
170
176
final DbFileAfterRun run2 = cmp .getRun2 ();
@@ -225,6 +231,14 @@ def on_input(event):
225
231
}
226
232
}
227
233
234
+ public int getSame () {
235
+ return same ;
236
+ }
237
+
238
+ public int getDiff () {
239
+ return diff ;
240
+ }
241
+
228
242
// private void outSingleFile(PrintWriter pw, DbFileForRun file) throws IOException {
229
243
// final String name = file.getFileName(minimalPrefix).replace(".puml", "");
230
244
// pw.print("<div class=detail_result id=" + name + ">");
You can’t perform that action at this time.
0 commit comments