From 05ab7783968e00159ef126d53edc4453a48780ea Mon Sep 17 00:00:00 2001 From: rusefi Date: Tue, 10 Dec 2019 01:03:02 -0500 Subject: [PATCH] clean-up --- unit_tests/tests/test_ion.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/unit_tests/tests/test_ion.cpp b/unit_tests/tests/test_ion.cpp index 3ca7cbcfba..fca66ff6b4 100644 --- a/unit_tests/tests/test_ion.cpp +++ b/unit_tests/tests/test_ion.cpp @@ -5,9 +5,6 @@ * @author Andrey Belomutskiy, (c) 2012-2019 */ -#ifndef TEST_ION_CPP_ -#define TEST_ION_CPP_ - #include "gtest/gtest.h" #include "cdm_ion_sense.h" @@ -16,28 +13,22 @@ TEST(ion, signalCounter) { EXPECT_EQ(0, state.getValue(0)); - state.onNewSignal(2); - state.onNewSignal(2); - state.onNewSignal(2); + state.onNewSignal(/* currentRevolution= */ 2); + state.onNewSignal(/* currentRevolution= */ 2); + state.onNewSignal(/* currentRevolution= */ 2); // value is still '0' until we signal end of engine cycle - EXPECT_EQ(0, state.getValue(2)); + EXPECT_EQ(0, state.getValue(/* currentRevolution= */2)); // this invocation would flush current accumulation - EXPECT_EQ(3, state.getValue(3)); + EXPECT_EQ(3, state.getValue(/* currentRevolution= */3)); - state.onNewSignal(3); + state.onNewSignal(/* currentRevolution= */3); // returning previous full cycle value EXPECT_EQ(3, state.getValue(3)); - EXPECT_EQ(1, state.getValue(4)); - EXPECT_EQ(0, state.getValue(5)); - - - - + EXPECT_EQ(1, state.getValue(/* currentRevolution= */4)); + EXPECT_EQ(0, state.getValue(/* currentRevolution= */5)); } - -#endif /* TEST_ION_CPP_ */