correcting unit tests

This commit is contained in:
rusefillc 2024-03-29 11:08:19 -04:00 committed by rusefillc
parent 72cd8f26c3
commit 9fcc6535bf
1 changed files with 48 additions and 32 deletions

View File

@ -53,49 +53,65 @@ public class LiveDataProcessorTest {
assertEquals(14, captor.fileCapture.size());
captor.assertOutput("tempC0 = scalar, U16, 0, \"C\", 1, 0\n" +
"bitName0 = bits, U32, 4, [0:0]\n" +
"esr0 = scalar, U16, 8, \"ohm\", 1, 0\n" +
"; total TS size = 12\n" +
"oootempC = scalar, U16, 12, \"C\", 1, 0\n" +
"oooesr = scalar, U16, 14, \"ohm\", 1, 0\n" +
"; total TS size = 16\n", LiveDataProcessor.OUTPUTS_SECTION_FILE_NAME);
"bitName0 = bits, U32, 4, [0:0]\n" +
"esr0 = scalar, U16, 8, \"ohm\", 1, 0\n" +
"; total TS size = 12\n" +
"tempC1 = scalar, U16, 12, \"C\", 1, 0\n" +
"bitName1 = bits, U32, 16, [0:0]\n" +
"esr1 = scalar, U16, 20, \"ohm\", 1, 0\n" +
"; total TS size = 24\n" +
"oootempC = scalar, U16, 24, \"C\", 1, 0\n" +
"oooesr = scalar, U16, 26, \"ohm\", 1, 0\n" +
"; total TS size = 28\n", LiveDataProcessor.OUTPUTS_SECTION_FILE_NAME);
captor.assertOutput("entry = tempC0, \"WBO: Temperature0\", int, \"%d\"\n" +
"entry = bitName0, \"bitName0\", int, \"%d\"\n" +
"entry = esr0, \"WBO: ESR0\", int, \"%d\"\n" +
";entry = tempC1, \"WBO: Temperature1\", int, \"%d\"\n" +
";entry = bitName1, \"bitName1\", int, \"%d\"\n" +
";entry = esr1, \"WBO: ESR1\", int, \"%d\"\n" +
"entry = oootempC, \"Temperature\", int, \"%d\"\n" +
"entry = oooesr, \"ESR\", int, \"%d\"\n", LiveDataProcessor.DATA_LOG_FILE_NAME);
"entry = bitName0, \"bitName0\", int, \"%d\"\n" +
"entry = esr0, \"WBO: ESR0\", int, \"%d\"\n" +
"entry = tempC1, \"WBO: Temperature1\", int, \"%d\"\n" +
"entry = bitName1, \"bitName1\", int, \"%d\"\n" +
"entry = esr1, \"WBO: ESR1\", int, \"%d\"\n" +
"entry = oootempC, \"Temperature\", int, \"%d\"\n" +
"entry = oooesr, \"ESR\", int, \"%d\"\n", LiveDataProcessor.DATA_LOG_FILE_NAME);
captor.assertOutput("// generated by gen_live_documentation.sh / LiveDataProcessor.java\n" +
"decl_frag<wbo_channels_s, 0>{},\t// wb1\n" +
"// decl_frag<wbo_channels_s, 1>{},\t// wb2\n" +
"decl_frag<output_channels_s>{},\n", LiveDataProcessor.DATA_FRAGMENTS_H);
"decl_frag<wbo_channels_s, 0>{},\t// wb1\n" +
"decl_frag<wbo_channels_s, 1>{},\t// wb2\n" +
"decl_frag<output_channels_s>{},\n", LiveDataProcessor.DATA_FRAGMENTS_H);
captor.assertOutput("indicatorPanel = wbo_channels0IndicatorPanel, 2\n" +
"\tindicator = {bitName0}, \"bitName No\", \"bitName Yes\"\n" +
"\n" +
"dialog = wbo_channels0Dialog, \"wbo_channels0\"\n" +
"\tpanel = wbo_channels0IndicatorPanel\n" +
"\tliveGraph = wbo_channels0_1_Graph, \"Graph\", South\n" +
"\t\tgraphLine = tempC0\n" +
"\t\tgraphLine = esr0\n" +
"\n" +
"\n" +
"dialog = output_channelsDialog, \"output_channels\"\n" +
"\tliveGraph = output_channels_1_Graph, \"Graph\", South\n" +
"\t\tgraphLine = oootempC\n" +
"\t\tgraphLine = oooesr\n" +
"\n", LiveDataProcessor.FANCY_CONTENT_INI);
"\tindicator = {bitName0}, \"bitName No\", \"bitName Yes\"\n" +
"\n" +
"dialog = wbo_channels0Dialog, \"wbo_channels0\"\n" +
"\tpanel = wbo_channels0IndicatorPanel\n" +
"\tliveGraph = wbo_channels0_1_Graph, \"Graph\", South\n" +
"\t\tgraphLine = tempC0\n" +
"\t\tgraphLine = esr0\n" +
"\n" +
"indicatorPanel = wbo_channels1IndicatorPanel, 2\n" +
"\tindicator = {bitName1}, \"bitName No\", \"bitName Yes\"\n" +
"\n" +
"dialog = wbo_channels1Dialog, \"wbo_channels1\"\n" +
"\tpanel = wbo_channels1IndicatorPanel\n" +
"\tliveGraph = wbo_channels1_1_Graph, \"Graph\", South\n" +
"\t\tgraphLine = tempC1\n" +
"\t\tgraphLine = esr1\n" +
"\n" +
"\n" +
"dialog = output_channelsDialog, \"output_channels\"\n" +
"\tliveGraph = output_channels_1_Graph, \"Graph\", South\n" +
"\t\tgraphLine = oootempC\n" +
"\t\tgraphLine = oooesr\n" +
"\n", LiveDataProcessor.FANCY_CONTENT_INI);
captor.assertOutput("\t\t\tsubMenu = wbo_channels0Dialog, \"wbo_channels0\"\n" +
"\t\t\tsubMenu = output_channelsDialog, \"output_channels\"\n", LiveDataProcessor.FANCY_MENU_INI);
"\t\t\tsubMenu = wbo_channels1Dialog, \"wbo_channels1\"\n" +
"\t\t\tsubMenu = output_channelsDialog, \"output_channels\"\n", LiveDataProcessor.FANCY_MENU_INI);
captor.assertOutput("\tgaugeCategory = \"cate\"\n" +
"tempC0Gauge = tempC0,\"WBO: Temperature0\", \"C\", 500.0,1000.0, 500.0,1000.0, 500.0,1000.0, 0,0\n", LiveDataProcessor.GAUGES);
"tempC0Gauge = tempC0,\"WBO: Temperature0\", \"C\", 500.0,1000.0, 500.0,1000.0, 500.0,1000.0, 0,0\n" +
"tempC1Gauge = tempC1,\"WBO: Temperature1\", \"C\", 500.0,1000.0, 500.0,1000.0, 500.0,1000.0, 0,0\n",
LiveDataProcessor.GAUGES);
captor.assertOutput("// generated by gen_live_documentation.sh / LiveDataProcessor.java\n" +
"#pragma once\n" +