diff --git a/unit_tests/test.mk b/unit_tests/test.mk index 58e0cecc69..88a1520dac 100644 --- a/unit_tests/test.mk +++ b/unit_tests/test.mk @@ -9,6 +9,7 @@ TEST_SRC_CPP = test_util.cpp \ test_trigger_decoder.cpp \ test_fuel_map.cpp \ engine_test_helper.cpp \ + test_logic_expression.cpp \ test_speed_density.cpp \ test_signal_executor.cpp \ test_sensors.cpp \ diff --git a/unit_tests/test_accel_enrichment.h b/unit_tests/test_accel_enrichment.h index 225a846664..bfc339e2e9 100644 --- a/unit_tests/test_accel_enrichment.h +++ b/unit_tests/test_accel_enrichment.h @@ -6,12 +6,9 @@ * Author: Andrey Belomutskiy, (c) 2012-2013 */ - #ifndef TEST_ACCEL_ENRICHMENT_H_ #define TEST_ACCEL_ENRICHMENT_H_ void testAccelEnrichment(void); - - #endif /* TEST_ACCEL_ENRICHMENT_H_ */ diff --git a/unit_tests/test_logic_expression.cpp b/unit_tests/test_logic_expression.cpp new file mode 100644 index 0000000000..6a97e002eb --- /dev/null +++ b/unit_tests/test_logic_expression.cpp @@ -0,0 +1,23 @@ +/** + * @file test_logic_expression.cpp + * + * https://sourceforge.net/p/rusefi/tickets/102/ + * + * @date Oct 3, 2014 + * @author Andrey Belomutskiy, (c) 2012-2014 + */ + +#include "main.h" +#include "test_logic_expression.h" + +void testLogicExpressions(void) { + /** + * fuel_pump = (time_since_boot < 4 seconds) OR (rpm > 0) + * fuel_pump = time_since_boot 4 less rpm 0 more OR + */ + + /** + * fan = (not fan && coolant > 90) OR (fan && coolant > 85) + * fan = fan NOT coolant 90 AND more fan coolant 85 more AND OR + */ +} diff --git a/unit_tests/test_logic_expression.h b/unit_tests/test_logic_expression.h new file mode 100644 index 0000000000..5bea826570 --- /dev/null +++ b/unit_tests/test_logic_expression.h @@ -0,0 +1,13 @@ +/** + * @file test_logic_expression.h + * + * @date Oct 3, 2014 + * @author Andrey Belomutskiy, (c) 2012-2014 + */ + +#ifndef TEST_LOGIC_EXPRESSION_H_ +#define TEST_LOGIC_EXPRESSION_H_ + +void testLogicExpressions(void); + +#endif /* TEST_LOGIC_EXPRESSION_H_ */