Skip to content

Commit 81537da

Browse files
committed
tests: Remove the dummy serial test and replace it with a (dummy) Unity
test. Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
1 parent c61faaf commit 81537da

File tree

4 files changed

+35
-14
lines changed

4 files changed

+35
-14
lines changed

tests/serial/serial.ino

-12
This file was deleted.

tests/serial/test_serial.py

-2
This file was deleted.

tests/unity/test_unity.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test_unity(dut):
2+
dut.expect_unity_test_output(timeout=240)

tests/unity/unity.ino

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#include <unity.h>
2+
3+
4+
/* These functions are intended to be called before and after each test. */
5+
void setUp(void) {
6+
}
7+
8+
void tearDown(void){
9+
}
10+
11+
12+
void test_pass(void){
13+
TEST_ASSERT_EQUAL(1, 1);
14+
}
15+
16+
void test_fail(void){
17+
TEST_ASSERT_EQUAL(1, 0);
18+
}
19+
20+
void setup() {
21+
Serial.begin(115200);
22+
while (!Serial) {
23+
;
24+
}
25+
26+
UNITY_BEGIN();
27+
RUN_TEST(test_pass);
28+
RUN_TEST(test_fail);
29+
UNITY_END();
30+
}
31+
32+
void loop() {
33+
}

0 commit comments

Comments
 (0)