Skip to content

Commit aa4fddc

Browse files
committed
Merge pull request #1584 from bridadan/more-not-supported-tests
Adding more [NOT_SUPPORTED] messages to tests
2 parents de3b14e + c38209f commit aa4fddc

File tree

7 files changed

+35
-2
lines changed

7 files changed

+35
-2
lines changed

libraries/tests/mbed/analog_in/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ DigitalOut indicator(LED1);
2121

2222
#else
2323

24+
#error [NOT_SUPPORTED] This test is not supported on this target
25+
2426
#endif
2527

2628
uint8_t successes = 0;

libraries/tests/mbed/interruptin/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#if !DEVICE_INTERRUPTIN
2+
#error [NOT_SUPPORTED] InterruptIn is not supported
3+
#endif
4+
15
#include "test_env.h"
26

37
DigitalOut myled(LED1);
@@ -101,7 +105,7 @@ void in_handler() {
101105
#define PIN_OUT PB02
102106
#define PIN_IN PB03
103107

104-
#elif defined(TARGET_SAML21J18A)
108+
#elif defined(TARGET_SAML21J18A)
105109
#define PIN_OUT PA02
106110
#define PIN_IN PA03
107111

libraries/tests/mbed/interruptin_2/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#if !DEVICE_INTERRUPTIN
2+
#error [NOT_SUPPORTED] InterruptIn is not supported
3+
#endif
4+
15
#include "mbed.h"
26

37
#if defined(TARGET_LPC4088)

libraries/tests/mbed/portout_portin/main.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
#if !DEVICE_PORTIN
2+
#error [NOT_SUPPORTED] PortIn is not supported
3+
#endif
4+
5+
#if !DEVICE_PORTOUT
6+
#error [NOT_SUPPORTED] PortOut is not supported
7+
#endif
8+
19
#include "test_env.h"
210

311
#if defined(TARGET_K64F) || defined(TARGET_KL05Z)
@@ -90,7 +98,7 @@
9098
#define P2_1 (1 << 1) // PA_1
9199
#define P2_2 (1 << 2) // PA_2
92100
#define PORT_2 PortA
93-
101+
94102
#elif defined(TARGET_NUCLEO_F030R8) || \
95103
defined(TARGET_NUCLEO_F070RB) || \
96104
defined(TARGET_NUCLEO_F072RB) || \
@@ -176,6 +184,9 @@
176184
#define P2_2 (1 << 1) /*PB01*/
177185
#define PORT_2 PortB
178186

187+
#else
188+
#error [NOT_SUPPORTED] This test is not supported on this target
189+
179190
#endif
180191

181192
#define MASK_1 (P1_1 | P1_2)

libraries/tests/mbed/rtc/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#if !DEVICE_RTC
2+
#error [NOT_SUPPORTED] RTC is not supported
3+
#endif
4+
15
#include "mbed.h"
26
#include "test_env.h"
37

libraries/tests/mbed/sleep/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#if !DEVICE_SLEEP
2+
#error [NOT_SUPPORTED] Sleep is not supported
3+
#endif
4+
15
#include "test_env.h"
26

37
#if defined(TARGET_LPC4088)

libraries/tests/mbed/sleep_timeout/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#if !DEVICE_SLEEP
2+
#error [NOT_SUPPORTED] Sleep is not supported
3+
#endif
4+
15
#include "mbed.h"
26

37
DigitalOut led1(LED1);

0 commit comments

Comments
 (0)