From 279a59fa5951d5330845cf3f10f717a17986da51 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Thu, 18 Jan 2024 08:57:50 +0000 Subject: [PATCH] Added syntax checks for crc8_j1850 & crc8_j1850_zero --- test/syntax_check/c++03/CMakeLists.txt | 6 +++ test/syntax_check/c++11/CMakeLists.txt | 6 +++ test/syntax_check/c++14/CMakeLists.txt | 6 +++ test/syntax_check/c++17/CMakeLists.txt | 6 +++ test/syntax_check/c++20/CMakeLists.txt | 6 +++ test/syntax_check/crc8_j1850.h.t.cpp | 29 ++++++++++++++ test/syntax_check/crc8_j1850_zero.h.t.cpp | 29 ++++++++++++++ test/vs2022/etl.vcxproj | 32 +++++++++++++++ test/vs2022/etl.vcxproj.filters | 48 ++++++++++++++++++++--- 9 files changed, 162 insertions(+), 6 deletions(-) create mode 100644 test/syntax_check/crc8_j1850.h.t.cpp create mode 100644 test/syntax_check/crc8_j1850_zero.h.t.cpp diff --git a/test/syntax_check/c++03/CMakeLists.txt b/test/syntax_check/c++03/CMakeLists.txt index 0b63c6b21..7a425be17 100644 --- a/test/syntax_check/c++03/CMakeLists.txt +++ b/test/syntax_check/c++03/CMakeLists.txt @@ -38,6 +38,10 @@ set_target_properties(t98 PROPERTIES CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS ON ) +target_compile_options(t98 + PRIVATE + -fsyntax-only + ) target_sources(t98 PRIVATE etl_profile.h ../absolute.h.t.cpp ../algorithm.h.t.cpp @@ -123,6 +127,8 @@ target_sources(t98 PRIVATE etl_profile.h ../crc8_maxim.h.t.cpp ../crc8_rohc.h.t.cpp ../crc8_wcdma.h.t.cpp + ../crc8_j1850.h.t.cpp + ../crc8_j1850_zero.h.t.cpp ../cyclic_value.h.t.cpp ../debounce.h.t.cpp ../debug_count.h.t.cpp diff --git a/test/syntax_check/c++11/CMakeLists.txt b/test/syntax_check/c++11/CMakeLists.txt index 72900939b..29dc304ed 100644 --- a/test/syntax_check/c++11/CMakeLists.txt +++ b/test/syntax_check/c++11/CMakeLists.txt @@ -38,6 +38,10 @@ set_target_properties(t11 PROPERTIES CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS ON ) +target_compile_options(t11 + PRIVATE + -fsyntax-only + ) target_sources(t11 PRIVATE etl_profile.h ../absolute.h.t.cpp ../algorithm.h.t.cpp @@ -123,6 +127,8 @@ target_sources(t11 PRIVATE etl_profile.h ../crc8_maxim.h.t.cpp ../crc8_rohc.h.t.cpp ../crc8_wcdma.h.t.cpp + ../crc8_j1850.h.t.cpp + ../crc8_j1850_zero.h.t.cpp ../cyclic_value.h.t.cpp ../debounce.h.t.cpp ../debug_count.h.t.cpp diff --git a/test/syntax_check/c++14/CMakeLists.txt b/test/syntax_check/c++14/CMakeLists.txt index e9fb7a4eb..9df6214cb 100644 --- a/test/syntax_check/c++14/CMakeLists.txt +++ b/test/syntax_check/c++14/CMakeLists.txt @@ -38,6 +38,10 @@ set_target_properties(t14 PROPERTIES CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS ON ) +target_compile_options(t14 + PRIVATE + -fsyntax-only + ) target_sources(t14 PRIVATE etl_profile.h ../absolute.h.t.cpp ../algorithm.h.t.cpp @@ -123,6 +127,8 @@ target_sources(t14 PRIVATE etl_profile.h ../crc8_maxim.h.t.cpp ../crc8_rohc.h.t.cpp ../crc8_wcdma.h.t.cpp + ../crc8_j1850.h.t.cpp + ../crc8_j1850_zero.h.t.cpp ../cyclic_value.h.t.cpp ../debounce.h.t.cpp ../debug_count.h.t.cpp diff --git a/test/syntax_check/c++17/CMakeLists.txt b/test/syntax_check/c++17/CMakeLists.txt index 4ab127cee..6be7bb03b 100644 --- a/test/syntax_check/c++17/CMakeLists.txt +++ b/test/syntax_check/c++17/CMakeLists.txt @@ -38,6 +38,10 @@ set_target_properties(t17 PROPERTIES CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS ON ) +target_compile_options(t17 + PRIVATE + -fsyntax-only + ) target_sources(t17 PRIVATE etl_profile.h ../absolute.h.t.cpp ../algorithm.h.t.cpp @@ -123,6 +127,8 @@ target_sources(t17 PRIVATE etl_profile.h ../crc8_maxim.h.t.cpp ../crc8_rohc.h.t.cpp ../crc8_wcdma.h.t.cpp + ../crc8_j1850.h.t.cpp + ../crc8_j1850_zero.h.t.cpp ../cyclic_value.h.t.cpp ../debounce.h.t.cpp ../debug_count.h.t.cpp diff --git a/test/syntax_check/c++20/CMakeLists.txt b/test/syntax_check/c++20/CMakeLists.txt index f5046f87a..6c36b9d55 100644 --- a/test/syntax_check/c++20/CMakeLists.txt +++ b/test/syntax_check/c++20/CMakeLists.txt @@ -38,6 +38,10 @@ set_target_properties(t20 PROPERTIES CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS ON ) +target_compile_options(t20 + PRIVATE + -fsyntax-only + ) target_sources(t20 PRIVATE etl_profile.h ../absolute.h.t.cpp ../algorithm.h.t.cpp @@ -123,6 +127,8 @@ target_sources(t20 PRIVATE etl_profile.h ../crc8_maxim.h.t.cpp ../crc8_rohc.h.t.cpp ../crc8_wcdma.h.t.cpp + ../crc8_j1850.h.t.cpp + ../crc8_j1850_zero.h.t.cpp ../cyclic_value.h.t.cpp ../debounce.h.t.cpp ../debug_count.h.t.cpp diff --git a/test/syntax_check/crc8_j1850.h.t.cpp b/test/syntax_check/crc8_j1850.h.t.cpp new file mode 100644 index 000000000..5e16709f4 --- /dev/null +++ b/test/syntax_check/crc8_j1850.h.t.cpp @@ -0,0 +1,29 @@ +/****************************************************************************** +The MIT License(MIT) + +Embedded Template Library. +https://github.com/ETLCPP/etl +https://www.etlcpp.com + +Copyright(c) 2024 John Wellbelove + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files(the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions : + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +******************************************************************************/ + +#include diff --git a/test/syntax_check/crc8_j1850_zero.h.t.cpp b/test/syntax_check/crc8_j1850_zero.h.t.cpp new file mode 100644 index 000000000..ec892d09e --- /dev/null +++ b/test/syntax_check/crc8_j1850_zero.h.t.cpp @@ -0,0 +1,29 @@ +/****************************************************************************** +The MIT License(MIT) + +Embedded Template Library. +https://github.com/ETLCPP/etl +https://www.etlcpp.com + +Copyright(c) 2024 John Wellbelove + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files(the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions : + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +******************************************************************************/ + +#include diff --git a/test/vs2022/etl.vcxproj b/test/vs2022/etl.vcxproj index 4c18142c7..46b7b05cb 100644 --- a/test/vs2022/etl.vcxproj +++ b/test/vs2022/etl.vcxproj @@ -2994,6 +2994,8 @@ + + @@ -4735,6 +4737,34 @@ true true + + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + true + true + true + true + true + true + true + true + true true @@ -7354,6 +7384,8 @@ + + diff --git a/test/vs2022/etl.vcxproj.filters b/test/vs2022/etl.vcxproj.filters index 2adfa8622..cad865ea7 100644 --- a/test/vs2022/etl.vcxproj.filters +++ b/test/vs2022/etl.vcxproj.filters @@ -1389,6 +1389,12 @@ ETL\Maths\CRC + + ETL\Maths\CRC + + + ETL\Maths\CRC + @@ -3284,6 +3290,18 @@ Tests\CRC + + Tests\Syntax Checks\Source + + + Tests\Syntax Checks\Source + + + Tests\CRC + + + Tests\CRC + @@ -3340,12 +3358,6 @@ Resource Files\CI\Appveyor - - Resource Files\CI\Github - - - Resource Files\CI\Github - Resource Files @@ -3412,6 +3424,30 @@ Tests\Scripts + + Resource Files\CI\Github + + + Resource Files\CI\Github + + + Resource Files\CI\Github + + + Resource Files\CI\Github + + + Resource Files\CI\Github + + + Resource Files\CI\Github + + + Resource Files\CI\Github + + + Resource Files\CI\Github +