diff --git a/platformio.ini b/platformio.ini index 39ceb01..03e3aa1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -8,7 +8,7 @@ ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html -[env] +[env:embedded] platform = espressif32 board = esp32doit-devkit-v1 board_build.partitions = no_ota.csv @@ -29,14 +29,14 @@ upload_port = COM3 extra_scripts = pre:autoVersionIncrement/version_increment_pre.py post:autoVersionIncrement/version_increment_post.py - -[env:release] -build_type = release - -[env:debug] +test_ignore = test_desktop build_type = debug monitor_filters = esp32_exception_decoder check_tool = clangtidy +[env:native] +platform = native +test_ignore = test_embedded + [platformio] description = A Rover who should be drive a route by gps. diff --git a/test/test_desktop/bootstrap.cpp b/test/test_desktop/bootstrap.cpp new file mode 100644 index 0000000..1bbb8aa --- /dev/null +++ b/test/test_desktop/bootstrap.cpp @@ -0,0 +1,22 @@ +#include "courseCalculation.hpp" +#include + +void setUp() { + +} + +void tearDown() { + +} + +void uselessTest() { + TEST_ASSERT_EQUAL(12, 12); +} + +int main(int argc, char **argv) { + UNITY_BEGIN(); + RUN_TEST(testCourseCalculation); + UNITY_END(); + + return 0; +} diff --git a/test/test_desktop/courseCalculation.hpp b/test/test_desktop/courseCalculation.hpp new file mode 100644 index 0000000..969ba19 --- /dev/null +++ b/test/test_desktop/courseCalculation.hpp @@ -0,0 +1,9 @@ +#include "route.h" +#include +#include + +void testCourseCalculation(void) { + Point point; + std::cout << "Hello world from Test" << std::endl; + TEST_ASSERT_EQUAL_INT(20, 20); +}