mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
Link Layer Frame Send Scheduler, Internal RX Polling, Framework for Generic Frames + Fragmentation
This commit is contained in:
3
components/dataLink/test/CMakeLists.txt
Normal file
3
components/dataLink/test/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
idf_component_register(SRC_DIRS "."
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES unity dataLink rmt esp_event)
|
||||
29
components/dataLink/test/test_dataLink.cpp
Normal file
29
components/dataLink/test/test_dataLink.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "unity.h"
|
||||
#include "DataLinkManager.h"
|
||||
#include <memory>
|
||||
|
||||
#define TEST_BOARD_ID 69
|
||||
|
||||
std::unique_ptr<DataLinkManager> createObj(){
|
||||
std::unique_ptr<DataLinkManager> obj = std::make_unique<DataLinkManager>(TEST_BOARD_ID, 4);
|
||||
TEST_ASSERT_NOT_NULL(obj.get());
|
||||
return obj;
|
||||
}
|
||||
|
||||
TEST_CASE("should instantiate an DataLinkManager object with 4 channels", "[dataLink]"){
|
||||
createObj();
|
||||
}
|
||||
|
||||
// void board_a(){
|
||||
// std::unique_ptr<DataLinkManager> obj = createObj();
|
||||
// unity_send_signal("board a");
|
||||
// unity_wait_for_signal("board b");
|
||||
// }
|
||||
|
||||
// void board_b(){
|
||||
// std::unique_ptr<DataLinkManager> obj = createObj();
|
||||
// unity_send_signal("board b");
|
||||
// unity_wait_for_signal("board a");
|
||||
// }
|
||||
|
||||
// TEST_CASE_MULTIPLE_DEVICES("should be able to send tables to another board and receive it", "[dataLink]", board_a, board_b);
|
||||
Reference in New Issue
Block a user