only:Non-square dimension maps #5641

This commit is contained in:
rusefillc 2023-10-25 20:15:31 -04:00
parent adf31716c2
commit 5223298df7
1 changed files with 13 additions and 0 deletions

View File

@ -55,6 +55,19 @@ public class ConfigFieldParserTest {
"; total TS size = 8\n", tsProjectConsumer.getContent());
}
@Test
public void testArray2D() {
String test = "struct pid_s\n" +
"int[3 x 1] afr_type;PID dTime;\"ms\", 1.0, 0, 0, 3000, 0, noMsqSave\n" +
"end_struct\n";
ReaderStateImpl state = new ReaderStateImpl();
TestTSProjectConsumer tsProjectConsumer = new TestTSProjectConsumer("", state);
state.readBufferedReader(test, tsProjectConsumer);
assertEquals("afr_type = array, S32, 0, [3x1], \"ms\", 1, 0, 0, 3000, 0, noMsqSave\n" +
"; total TS size = 12\n", tsProjectConsumer.getContent());
}
@Test(expected = IllegalStateException.class)
public void testSameFieldTwice() {
String test = "struct pid_s\n" +