TS project: hide all invalid entries fix #1505
This commit is contained in:
parent
4bc557c06d
commit
1c93e45cda
Binary file not shown.
|
@ -86,6 +86,8 @@ public class ReaderState {
|
|||
throw new IllegalStateException("Too many options in " + tunerStudioLine + " capacity=" + totalCount + "/size=" + enums.size());
|
||||
if (enums.size() <= totalCount / 2)
|
||||
throw new IllegalStateException("Too many bits allocated for " + enums + " capacity=" + totalCount + "/size=" + enums.size());
|
||||
for (int i = enums.size(); i < totalCount; i++)
|
||||
tunerStudioLine += ", \"INVALID\"";
|
||||
}
|
||||
|
||||
state.tsCustomLine.put(name, tunerStudioLine);
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ConfigFieldParserTest {
|
|||
CharArrayWriter writer = new CharArrayWriter();
|
||||
TestTSProjectConsumer javaFieldsConsumer = new TestTSProjectConsumer(writer, "", state);
|
||||
state.readBufferedReader(reader, Arrays.asList(javaFieldsConsumer));
|
||||
assertEquals("\tafr_type\t\t\t\t\t = bits, S32, 0, [0:1], \"BPSX\", \"Innovate\", \"14Point7\"\n" +
|
||||
assertEquals("\tafr_type\t\t\t\t\t = bits, S32, 0, [0:1], \"BPSX\", \"Innovate\", \"14Point7\", \"INVALID\"\n" +
|
||||
"; total TS size = 4\n", new String(writer.toCharArray()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue