From 3918c12a43f104807aa7d803f98a735e5894bad0 Mon Sep 17 00:00:00 2001 From: Miki Rozloznik Date: Tue, 26 Nov 2024 14:41:08 +0100 Subject: [PATCH] Add member access tests --- test/language/member_access/CMakeLists.txt | 24 +++++++++++++++++++ .../member_access/ClangTidySuppressions.txt | 1 + 2 files changed, 25 insertions(+) create mode 100644 test/language/member_access/CMakeLists.txt create mode 100644 test/language/member_access/ClangTidySuppressions.txt diff --git a/test/language/member_access/CMakeLists.txt b/test/language/member_access/CMakeLists.txt new file mode 100644 index 0000000..db022b8 --- /dev/null +++ b/test/language/member_access/CMakeLists.txt @@ -0,0 +1,24 @@ +add_library(member_access_zs STATIC ${TEST_ZS_ROOT}/member_access.zs) +zserio_generate_cpp( + TARGET member_access_zs + SRC_DIR ${TEST_ZS_ROOT} + GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}/gen + EXTRA_ARGS ${ZSERIO_EXTRA_ARGS} + GENERATED_SOURCES_VAR GENERATED_SOURCES + OUTPUT_VAR ZSERIO_LOG + ERROR_VAR ZSERIO_LOG +) +target_link_libraries(member_access_zs PUBLIC ZserioCpp17Runtime) +if (ZSERIO_LOG) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/zserio_log.txt "${ZSERIO_LOG}") + check_zserio_warnings("${ZSERIO_LOG}" 0) +endif () + +add_custom_test(member_access + DEPENDS + member_access_zs + SOURCES + # + GENERATED_SOURCES + ${GENERATED_SOURCES} +) diff --git a/test/language/member_access/ClangTidySuppressions.txt b/test/language/member_access/ClangTidySuppressions.txt new file mode 100644 index 0000000..b53c11a --- /dev/null +++ b/test/language/member_access/ClangTidySuppressions.txt @@ -0,0 +1 @@ +performance-move-const-arg:gen/member_access/access_within_type/Message.cpp