Skip to content

Commit 07f9cfe

Browse files
committed
Adding checks for device support to assumption tests
1 parent 27a7850 commit 07f9cfe

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

TESTS/API/AnalogOut/AnalogOut.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616

1717
// check if AnalogOut is supported on this device
18-
19-
#warning [NOT_SUPPORTED] AnalogOut not supported on this platform, add 'DEVICE_ANALOGOUT' definition to your platform.
2018
#if !DEVICE_ANALOGOUT
2119
#error [NOT_SUPPORTED] AnalogOut not supported on this platform, add 'DEVICE_ANALOGOUT' definition to your platform.
2220
#endif

TESTS/assumptions/AnalogOut/AnalogOut.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// check if AnalogOut is supported on this device
2+
#if !DEVICE_ANALOGOUT
3+
#error [NOT_SUPPORTED] AnalogOut not supported on this platform, add 'DEVICE_ANALOGOUT' definition to your platform.
4+
#endif
5+
16
#include "mbed.h"
27
#include "greentea-client/test_env.h"
38
#include "unity.h"

TESTS/assumptions/I2C/I2C.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// check if I2C is supported on this device
2+
#if !DEVICE_I2C
3+
#error [NOT_SUPPORTED] I2C not supported on this platform, add 'DEVICE_I2C' definition to your platform.
4+
#endif
5+
16
#include "mbed.h"
27
#include "greentea-client/test_env.h"
38
#include "unity.h"

TESTS/assumptions/Pwm/Pwm.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#if !DEVICE_PWMOUT
2+
#error [NOT_SUPPORTED] PWMOUT not supported on this platform, add 'DEVICE_PWMOUT' definition to your platform.
3+
#endif
4+
15
#include "mbed.h"
26
#include "greentea-client/test_env.h"
37
#include "unity.h"

TESTS/assumptions/SPI/SPI.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// check if SPI is supported on this device
2+
#if !DEVICE_SPI
3+
#error SPI is not supported on this platform, add 'DEVICE_SPI' definition to your platform.
4+
#endif
5+
16
#include "mbed.h"
27
#include "greentea-client/test_env.h"
38
#include "unity.h"

0 commit comments

Comments
 (0)