mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-12 07:17:13 +02:00
mod pedestal
This commit is contained in:
@ -17,8 +17,8 @@ endif()
|
||||
list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/extras)
|
||||
|
||||
add_executable(tests test.cpp)
|
||||
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain)
|
||||
|
||||
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain aare_core aare_compiler_flags)
|
||||
# target_compile_options(tests PRIVATE -fno-omit-frame-pointer -fsanitize=address)
|
||||
set_target_properties(tests PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
OUTPUT_NAME run_tests
|
||||
@ -34,7 +34,7 @@ set(TestSources
|
||||
target_sources(tests PRIVATE ${TestSources} )
|
||||
|
||||
#Work around to remove, this is not the way to do it =)
|
||||
target_link_libraries(tests PRIVATE aare_core aare_compiler_flags)
|
||||
# target_link_libraries(tests PRIVATE aare_core aare_compiler_flags)
|
||||
|
||||
|
||||
#configure a header to pass test file paths
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <climits>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <fmt/core.h>
|
||||
|
||||
TEST_CASE("Test suite can find data assets", "[.integration]") {
|
||||
auto fpath = test_data_path() / "numpy" / "test_numpy_file.npy";
|
||||
@ -18,4 +19,20 @@ TEST_CASE("Test suite can open data assets", "[.integration]") {
|
||||
TEST_CASE("Test float32 and char8") {
|
||||
REQUIRE(sizeof(float) == 4);
|
||||
REQUIRE(CHAR_BIT == 8);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Uncomment the following tests to verify that asan is working
|
||||
*/
|
||||
|
||||
// TEST_CASE("trigger asan stack"){
|
||||
// int arr[5] = {1,2,3,4,5};
|
||||
// int val = arr[7];
|
||||
// fmt::print("val: {}\n", val);
|
||||
// }
|
||||
|
||||
// TEST_CASE("trigger asan heap"){
|
||||
// auto *ptr = new int[5];
|
||||
// ptr[70] = 5;
|
||||
// fmt::print("ptr: {}\n", ptr[70]);
|
||||
// }
|
Reference in New Issue
Block a user