-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and fix tests, minor Packet class tweaks.
- Loading branch information
1 parent
1b89fe7
commit 188dd2d
Showing
14 changed files
with
420 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
set(TEST_DIR "${CMAKE_CURRENT_LIST_DIR}") | ||
|
||
add_library(MicrostrainTest "${TEST_DIR}/test.h" "${TEST_DIR}/test.c") | ||
|
||
# | ||
# MIP | ||
# | ||
|
||
macro(add_mip_test name sources command) | ||
add_executable(${name} ${sources}) | ||
|
||
target_include_directories(${name} PRIVATE ${MICROSTRAIN_SRC_DIR}) | ||
target_link_libraries(${name} ${MIP_LIBRARY}) | ||
target_include_directories(${name} PRIVATE ${CMAKE_CURRENT_LIST_DIR} ${MICROSTRAIN_SRC_DIR}) | ||
target_link_libraries(${name} MicrostrainTest ${MIP_LIBRARY}) | ||
|
||
add_test(${name} ${command} ${ARGN}) | ||
endmacro() | ||
|
||
add_mip_test(TestMipPacketBuilding "${TEST_DIR}/mip/test_mip_packet_builder.c" TestMipPacketBuilding) | ||
add_mip_test(TestMipParsing "${TEST_DIR}/mip/test_mip_parser.c" TestMipParsing "${TEST_DIR}/data/mip_data.bin") | ||
add_mip_test(TestMipRandom "${TEST_DIR}/mip/test_mip_random.c" TestMipRandom) | ||
add_mip_test(TestMipFields "${TEST_DIR}/mip/test_mip_fields.c" TestMipFields) | ||
add_mip_test(TestMipCpp "${TEST_DIR}/mip/test_mip.cpp" TestMipCpp) | ||
add_mip_test(TestMipPerf "${TEST_DIR}/mip/mip_parser_performance.cpp" TestMipPerf) | ||
add_mip_test(TestMipPacketBuilding "${TEST_DIR}/c/mip/test_mip_packet_builder.c" TestMipPacketBuilding) | ||
add_mip_test(TestMipParsing "${TEST_DIR}/c/mip/test_mip_parser.c" TestMipParsing "${TEST_DIR}/data/mip_data.bin") | ||
add_mip_test(TestMipRandom "${TEST_DIR}/c/mip/test_mip_random.c" TestMipRandom) | ||
add_mip_test(TestMipFields "${TEST_DIR}/c/mip/test_mip_fields.c" TestMipFields) | ||
add_mip_test(TestMipCpp "${TEST_DIR}/cpp/mip/test_mip.cpp" TestMipCpp) | ||
add_mip_test(TestMipPerf "${TEST_DIR}/cpp/mip/mip_parser_performance.cpp" TestMipPerf) | ||
add_mip_test(TestMipPacket "${TEST_DIR}/cpp/mip/test_packet_interface.cpp" TestMipPacket) | ||
|
||
#if(MICROSTRAIN_BUILD_EXAMPLES) | ||
# set(OUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/MipPacketExampleOutput.txt") | ||
# add_test( | ||
# NAME TestMipPacketExample | ||
# COMMAND diff -u "${CMAKE_CURRENT_LIST_DIR}/data/packet_example_cpp_check.txt" <(examples/MipPacketExample) | ||
# ) | ||
#endif() |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.