mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-29 10:17:15 +02:00
Add initial hardware testing support (#6313)
- Added workflow triggered by cron or label "hil_test" - Added examples with both pytest and unity
This commit is contained in:
committed by
GitHub
parent
4da1051266
commit
96f8f5e3ef
33
tests/unity/unity.ino
Normal file
33
tests/unity/unity.ino
Normal file
@ -0,0 +1,33 @@
|
||||
#include <unity.h>
|
||||
|
||||
|
||||
/* These functions are intended to be called before and after each test. */
|
||||
void setUp(void) {
|
||||
}
|
||||
|
||||
void tearDown(void){
|
||||
}
|
||||
|
||||
|
||||
void test_pass(void){
|
||||
TEST_ASSERT_EQUAL(1, 1);
|
||||
}
|
||||
|
||||
void test_fail(void){
|
||||
TEST_ASSERT_EQUAL(1, 1);
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
while (!Serial) {
|
||||
;
|
||||
}
|
||||
|
||||
UNITY_BEGIN();
|
||||
RUN_TEST(test_pass);
|
||||
RUN_TEST(test_fail);
|
||||
UNITY_END();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
}
|
Reference in New Issue
Block a user