WIP: Integrated Unity test framework.

This commit is contained in:
Chad Attermann committed 2025-08-25 14:42:15 -06:00
1 parent b28962aaa9
commit bac53b9e6d
7 files changed
+507 -132

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
#include <unity.h>
void setUp(void) {
// set stuff up here before each test
}
void tearDown(void) {
// clean stuff up here after each test
}
void testExample() {
bool success = true;
TEST_ASSERT_EQUAL(true, success);
}
int runUnityTests(void) {
UNITY_BEGIN();
RUN_TEST(testExample);
return UNITY_END();
}
// For native dev-platform or for some embedded frameworks
int main(void) {
return runUnityTests();
}
#ifdef ARDUINO
// For Arduino framework
void setup() {
// Wait ~2 seconds before the Unity test runner
// establishes connection with a board Serial interface
delay(2000);
runUnityTests();
}
void loop() {}
#endif
// For ESP-IDF framework
void app_main() {
runUnityTests();
}