more clear graphical representation of the "C" in test cases.

This commit is contained in:
hneemann 2017-07-04 06:33:26 +02:00
parent 80bcfe82ac
commit c23796bf5b

View File

@ -92,26 +92,27 @@ public class DataPlotter implements Drawable {
Style style; Style style;
switch (s[i].getState()) { switch (s[i].getState()) {
case FAIL: case FAIL:
style=Style.FAILED; style = Style.FAILED;
break; break;
case PASS: case PASS:
style=Style.PASS; style = Style.PASS;
break; break;
default: default:
style=Style.NORMAL; style = Style.NORMAL;
} }
long width = data.getMax(i); long width = data.getMax(i);
if (width == 0) width = 1; if (width == 0) width = 1;
int ry; int ry;
if (s[i].getType() == Value.Type.CLOCK) { if (s[i].getType() == Value.Type.CLOCK) {
int xdown = (int) (size / 4);
ry = 0; ry = 0;
g.drawLine(new Vector(xx, y + ry), new Vector((int) (xx + size / 2), y + ry), style); g.drawLine(new Vector(xx, y + ry), new Vector(xx + xdown, y + ry), style);
if (!first && ry != lastRy[i]) if (!first && ry != lastRy[i])
g.drawLine(new Vector(xx, y + lastRy[i]), new Vector(xx, y + ry), style); g.drawLine(new Vector(xx, y + lastRy[i]), new Vector(xx, y + ry), style);
ry = SIZE; ry = SIZE;
g.drawLine(new Vector((int) (xx + size / 2), y + ry), new Vector((int) (xx + size), y + ry), style); g.drawLine(new Vector(xx + xdown, y + ry), new Vector((int) (xx + size), y + ry), style);
g.drawLine(new Vector((int) (xx + size / 2), y), new Vector((int) (xx + size / 2), y + SIZE), style); g.drawLine(new Vector(xx + xdown, y), new Vector(xx + xdown, y + SIZE), style);
} else { } else {
ry = (int) (SIZE - (SIZE * s[i].getValue()) / width); ry = (int) (SIZE - (SIZE * s[i].getValue()) / width);
g.drawLine(new Vector(xx, y + ry), new Vector((int) (xx + size), y + ry), style); g.drawLine(new Vector(xx, y + ry), new Vector((int) (xx + size), y + ry), style);