Skip to content

Commit

Permalink
Merge pull request #1584 from bridadan/more-not-supported-tests
Browse files Browse the repository at this point in the history
Adding more [NOT_SUPPORTED] messages to tests
  • Loading branch information
0xc0170 committed Mar 3, 2016
2 parents de3b14e + c38209f commit aa4fddc
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 2 deletions.
2 changes: 2 additions & 0 deletions libraries/tests/mbed/analog_in/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ DigitalOut indicator(LED1);

#else

#error [NOT_SUPPORTED] This test is not supported on this target

#endif

uint8_t successes = 0;
Expand Down
6 changes: 5 additions & 1 deletion libraries/tests/mbed/interruptin/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if !DEVICE_INTERRUPTIN
#error [NOT_SUPPORTED] InterruptIn is not supported
#endif

#include "test_env.h"

DigitalOut myled(LED1);
Expand Down Expand Up @@ -101,7 +105,7 @@ void in_handler() {
#define PIN_OUT PB02
#define PIN_IN PB03

#elif defined(TARGET_SAML21J18A)
#elif defined(TARGET_SAML21J18A)
#define PIN_OUT PA02
#define PIN_IN PA03

Expand Down
4 changes: 4 additions & 0 deletions libraries/tests/mbed/interruptin_2/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if !DEVICE_INTERRUPTIN
#error [NOT_SUPPORTED] InterruptIn is not supported
#endif

#include "mbed.h"

#if defined(TARGET_LPC4088)
Expand Down
13 changes: 12 additions & 1 deletion libraries/tests/mbed/portout_portin/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#if !DEVICE_PORTIN
#error [NOT_SUPPORTED] PortIn is not supported
#endif

#if !DEVICE_PORTOUT
#error [NOT_SUPPORTED] PortOut is not supported
#endif

#include "test_env.h"

#if defined(TARGET_K64F) || defined(TARGET_KL05Z)
Expand Down Expand Up @@ -90,7 +98,7 @@
#define P2_1 (1 << 1) // PA_1
#define P2_2 (1 << 2) // PA_2
#define PORT_2 PortA

#elif defined(TARGET_NUCLEO_F030R8) || \
defined(TARGET_NUCLEO_F070RB) || \
defined(TARGET_NUCLEO_F072RB) || \
Expand Down Expand Up @@ -176,6 +184,9 @@
#define P2_2 (1 << 1) /*PB01*/
#define PORT_2 PortB

#else
#error [NOT_SUPPORTED] This test is not supported on this target

#endif

#define MASK_1 (P1_1 | P1_2)
Expand Down
4 changes: 4 additions & 0 deletions libraries/tests/mbed/rtc/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if !DEVICE_RTC
#error [NOT_SUPPORTED] RTC is not supported
#endif

#include "mbed.h"
#include "test_env.h"

Expand Down
4 changes: 4 additions & 0 deletions libraries/tests/mbed/sleep/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if !DEVICE_SLEEP
#error [NOT_SUPPORTED] Sleep is not supported
#endif

#include "test_env.h"

#if defined(TARGET_LPC4088)
Expand Down
4 changes: 4 additions & 0 deletions libraries/tests/mbed/sleep_timeout/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if !DEVICE_SLEEP
#error [NOT_SUPPORTED] Sleep is not supported
#endif

#include "mbed.h"

DigitalOut led1(LED1);
Expand Down

0 comments on commit aa4fddc

Please sign in to comment.