Skip to content

Commit 0f8ea31

Browse files
committed
Dependency Unity for testing should not be part of build dependencies, unity_config.h can be removed and Test items are correctly referenced.
1 parent 54b8e58 commit 0f8ea31

File tree

3 files changed

+6
-251
lines changed

3 files changed

+6
-251
lines changed

controller/tea_poor/platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ framework = arduino
1515
test_framework = unity
1616
lib_deps =
1717
lasselukkari/aWOT@^3.5.0
18-
throwtheswitch/Unity@^2.5.2
1918
test_ignore = local
2019

controller/tea_poor/test/test_local/WaterPumpScheduler_test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ void test_pump_stops_after_given_time() {
3737
waterPumpScheduler.start(runTimeMs, currentTimeMs);
3838
// check status
3939
auto status = waterPumpScheduler.status();
40-
UNITY_TEST_ASSERT_TRUE(status.isRunning);
41-
UNITY_TEST_ASSERT_EQUAL(status.stopTime, runTimeMs);
40+
TEST_ASSERT_TRUE(status.isRunning);
41+
TEST_ASSERT_EQUAL(status.stopTime, runTimeMs);
4242

4343
while (currentTimeMs < runTimeMs) {
4444
waterPumpScheduler.tick(currentTimeMs);
45-
UNITY_TEST_ASSERT_TRUE(fakeWaterPump.isRunning());
45+
TEST_ASSERT_TRUE(fakeWaterPump.isRunning());
4646
currentTimeMs += 100;
4747
}
4848
// pump should be stopped after given time
4949
waterPumpScheduler.tick(runTimeMs + 1);
50-
UNITY_TEST_ASSERT_FALSE(fakeWaterPump.isRunning());
50+
TEST_ASSERT_FALSE(fakeWaterPump.isRunning());
5151
}
5252

5353
// test that pump is periodically forced to stop after given time
@@ -60,14 +60,14 @@ void test_pump_is_periodically_forced_to_stop_after_given_time () {
6060
waterPumpScheduler.start(1, currentTimeMs);
6161
currentTimeMs += 1;
6262
waterPumpScheduler.tick(currentTimeMs);
63-
UNITY_TEST_ASSERT_FALSE(fakeWaterPump.isRunning()); // pump should be stopped after given time
63+
TEST_ASSERT_FALSE(fakeWaterPump.isRunning()); // pump should be stopped after given time
6464

6565
for(int i = 0; i < 10; i++) {
6666
// emulate that pump was started again
6767
fakeWaterPump.start();
6868
currentTimeMs += 1000;
6969
waterPumpScheduler.tick(currentTimeMs);
70-
UNITY_TEST_ASSERT_FALSE(fakeWaterPump.isRunning()); // pump should be stopped
70+
TEST_ASSERT_FALSE(fakeWaterPump.isRunning()); // pump should be stopped
7171
}
7272
}
7373

controller/tea_poor/test/test_local/unity_config.h

Lines changed: 0 additions & 244 deletions
This file was deleted.

0 commit comments

Comments
 (0)