Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed DRV88255 TextLCD Ping mbed-rtos
Diff: testing.h
- Revision:
- 61:6b5c2ddcea0c
- Parent:
- 58:b5f0c0f305ff
--- a/testing.h Sun Jun 19 23:00:18 2016 +0000
+++ b/testing.h Sun Jun 19 23:07:21 2016 +0000
@@ -39,12 +39,16 @@
#define ALARM_TEST(N,T,S,P,TIME) bool N(TestCase *tc) { \
DEF_MOCKS(T,S,P); \
- AlarmController alarm(false,0,&temp,&salt,&prox); \
+ SensorAlarmController temp_alarm(false,0,&temp,TEMP_MIN_CRIT, TEMP_MIN_UNDESIRED, TEMP_MAX_CRIT, TEMP_MAX_UNDESIRED); \
+ SensorAlarmController salt_alarm(false,0,&salt,SALT_MIN_CRIT, SALT_MIN_UNDESIRED, SALT_MAX_CRIT, SALT_MAX_UNDESIRED); \
+ SensorAlarmController prox_alarm(false,0,&salt,VOLUME_MIN_CRIT, VOLUME_MIN_UNDESIRED, VOLUME_MAX_CRIT, VOLUME_MAX_UNDESIRED); \
for(int i = 0; i < TIME; i++) { \
- alarm.run(); \
+ temp_alarm.run(); \
+ salt_alarm.run(); \
+ prox_alarm.run(); \
Thread::wait(1000); \
} \
- return alarm.is_error(); \
+ return temp_alarm.isError() || salt_alarm.isError() || prox_alarm.isError(); \
}
#define START_TESTS() int __num_failed=0; \