Skip to content

Commit 1200728

Browse files
authored
Merge pull request #32 from bridadan/assumptions_add_guards
Adding checks for device support to assumption tests
2 parents 27a7850 + 9ce839e commit 1200728

File tree

7 files changed

+21
-4
lines changed

7 files changed

+21
-4
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/API/SPI/SPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
// check if SPI is supported on this device
2727
#if !DEVICE_SPI
28-
#error SPI is not supported on this platform, add 'DEVICE_SPI' definition to your platform.
28+
#error [NOT_SUPPORTED] SPI is not supported on this platform, add 'DEVICE_SPI' definition to your platform.
2929
#endif
3030

3131
using namespace utest::v1;

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/PwmOut/PwmOut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
//#error [NOT_SUPPORTED] PWM tests are still being written and validated, not for public use yet.
1818

1919
#if !DEVICE_PWMOUT
20-
#error PWMOUT not supported on this platform, add 'DEVICE_PWMOUT' definition to your platform.
20+
#error [NOT_SUPPORTED] PWMOUT not supported on this platform, add 'DEVICE_PWMOUT' definition to your platform.
2121
#endif
2222

2323
#include "mbed.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 [NOT_SUPPORTED] 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)