csv format is hexadecimal by default if more than 3 bits are used. See #349

This commit is contained in:
hneemann 2019-09-27 16:17:06 +02:00
parent 7a2bc323a5
commit c16f313b00

View File

@ -295,8 +295,8 @@ public class ValueTable extends Observable implements Iterable<TestRow> {
* Columns formatting information * Columns formatting information
*/ */
public static final class ColumnInfo { public static final class ColumnInfo {
private int bits; private final int bits;
private IntFormat format; private final IntFormat format;
/** /**
* Creates a new instance * Creates a new instance
@ -305,6 +305,10 @@ public class ValueTable extends Observable implements Iterable<TestRow> {
* @param bits the number of bits to output * @param bits the number of bits to output
*/ */
public ColumnInfo(IntFormat format, int bits) { public ColumnInfo(IntFormat format, int bits) {
if (format == null)
format = IntFormat.def;
if (format.equals(IntFormat.def) && (bits > 3))
format = IntFormat.hex;
this.format = format; this.format = format;
this.bits = bits; this.bits = bits;
} }