assert that C and TS enum sizes match #3786

is this test testing anything?
This commit is contained in:
rusefillc 2022-01-14 22:44:22 -05:00
parent 96d0a623c0
commit 7850e6e57e
2 changed files with 7 additions and 1 deletions

View File

@ -18,6 +18,8 @@
static OutputPin alphaEn;
static OutputPin alphaTachPullUp;
static OutputPin alphaTempPullUp;
static OutputPin alphaCrankPPullUp;
static OutputPin alphaCrankNPullUp;
static void setInjectorPins() {
engineConfiguration->injectionPins[0] = H144_LS_1;
@ -94,6 +96,9 @@ void boardInitHardware() {
alphaEn.setValue(1);
alphaTachPullUp.initPin("a-tach", H144_OUT_IO1);
alphaTempPullUp.initPin("a-temp", H144_OUT_IO4);
alphaCrankPPullUp.initPin("a-crank-p", H144_OUT_IO2);
alphaCrankNPullUp.initPin("a-crank-n", H144_OUT_IO5);
}
void setBoardConfigOverrides() {

View File

@ -78,8 +78,9 @@ public class ConfigFieldParserTest {
@Test
public void testCustomEnum() throws IOException {
String test = "struct pid_s\n" +
"#define ego_sensor_e_size 4\n" +
"#define ego_sensor_e_enum \"BPSX\", \"Innovate\", \"14Point7\"\n" +
"custom ego_sensor_e 4 bits, S32, @OFFSET@, [0:1], @@ego_sensor_e_enum@@\n" +
"custom ego_sensor_e @@ego_sensor_e_size@@ bits, S32, @OFFSET@, [0:1], @@ego_sensor_e_enum@@\n" +
"ego_sensor_e afr_type;\n" +
"end_struct\n";
ReaderState state = new ReaderState();