Skip to content

Commit

Permalink
Added syntax checks for crc8_j1850 & crc8_j1850_zero
Browse files Browse the repository at this point in the history
  • Loading branch information
John Wellbelove committed Jan 18, 2024
1 parent ac4c3e6 commit 279a59f
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 6 deletions.
6 changes: 6 additions & 0 deletions test/syntax_check/c++03/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions test/syntax_check/c++11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions test/syntax_check/c++14/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions test/syntax_check/c++17/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions test/syntax_check/c++20/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions test/syntax_check/crc8_j1850.h.t.cpp
Original file line number Diff line number Diff line change
@@ -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 <etl/crc8_j1850.h>
29 changes: 29 additions & 0 deletions test/syntax_check/crc8_j1850_zero.h.t.cpp
Original file line number Diff line number Diff line change
@@ -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 <etl/crc8_j1850_zero.h>
32 changes: 32 additions & 0 deletions test/vs2022/etl.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2994,6 +2994,8 @@
<ClInclude Include="..\..\include\etl\crc8_ebu.h" />
<ClInclude Include="..\..\include\etl\crc8_icode.h" />
<ClInclude Include="..\..\include\etl\crc8_itu.h" />
<ClInclude Include="..\..\include\etl\crc8_j1850.h" />
<ClInclude Include="..\..\include\etl\crc8_j1850_zero.h" />
<ClInclude Include="..\..\include\etl\crc8_maxim.h" />
<ClInclude Include="..\..\include\etl\crc8_rohc.h" />
<ClInclude Include="..\..\include\etl\crc8_wcdma.h" />
Expand Down Expand Up @@ -4735,6 +4737,34 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++14 - No STL|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20 - Force C++03|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\syntax_check\crc8_j1850.h.t.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20 - No virtual imessage|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++ 20 - No Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20 - No STL|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++14|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MSVC C++20 - No STL - Optimised -O2|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++17|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++17 - No STL|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MSVC C++20 - Optimised O2|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20 - No virtual messages|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++14 - No STL|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20 - Force C++03|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\syntax_check\crc8_j1850_zero.h.t.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20 - No virtual imessage|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++ 20 - No Tests|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20 - No STL|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++14|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MSVC C++20 - No STL - Optimised -O2|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++17|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++17 - No STL|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release MSVC C++20 - Optimised O2|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20 - No virtual messages|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++14 - No STL|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20 - Force C++03|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\syntax_check\crc8_maxim.h.t.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC C++20 - No virtual imessage|Win32'">true</ExcludedFromBuild>
Expand Down Expand Up @@ -7354,6 +7384,8 @@
<ClCompile Include="..\test_crc8_ebu.cpp" />
<ClCompile Include="..\test_crc8_icode.cpp" />
<ClCompile Include="..\test_crc8_itu.cpp" />
<ClCompile Include="..\test_crc8_j1850.cpp" />
<ClCompile Include="..\test_crc8_j1850_zero.cpp" />
<ClCompile Include="..\test_crc8_maxim.cpp" />
<ClCompile Include="..\test_crc8_rohc.cpp" />
<ClCompile Include="..\test_crc8_wcdma.cpp" />
Expand Down
48 changes: 42 additions & 6 deletions test/vs2022/etl.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,12 @@
<ClInclude Include="..\..\include\etl\crc1.h">
<Filter>ETL\Maths\CRC</Filter>
</ClInclude>
<ClInclude Include="..\..\include\etl\crc8_j1850.h">
<Filter>ETL\Maths\CRC</Filter>
</ClInclude>
<ClInclude Include="..\..\include\etl\crc8_j1850_zero.h">
<Filter>ETL\Maths\CRC</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\test_string_char.cpp">
Expand Down Expand Up @@ -3284,6 +3290,18 @@
<ClCompile Include="..\test_crc1.cpp">
<Filter>Tests\CRC</Filter>
</ClCompile>
<ClCompile Include="..\syntax_check\crc8_j1850.h.t.cpp">
<Filter>Tests\Syntax Checks\Source</Filter>
</ClCompile>
<ClCompile Include="..\syntax_check\crc8_j1850_zero.h.t.cpp">
<Filter>Tests\Syntax Checks\Source</Filter>
</ClCompile>
<ClCompile Include="..\test_crc8_j1850.cpp">
<Filter>Tests\CRC</Filter>
</ClCompile>
<ClCompile Include="..\test_crc8_j1850_zero.cpp">
<Filter>Tests\CRC</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\library.properties">
Expand Down Expand Up @@ -3340,12 +3358,6 @@
<None Include="..\..\appveyor.yml">
<Filter>Resource Files\CI\Appveyor</Filter>
</None>
<None Include="..\..\.github\workflows\clang.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\..\.github\workflows\gcc.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\..\.clang-format">
<Filter>Resource Files</Filter>
</None>
Expand Down Expand Up @@ -3412,6 +3424,30 @@
<None Include="..\..\scripts\update_version.py">
<Filter>Tests\Scripts</Filter>
</None>
<None Include="..\..\.github\workflows\clang-c++11.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\..\.github\workflows\clang-c++14.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\..\.github\workflows\clang-c++17.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\..\.github\workflows\clang-c++20.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\..\.github\workflows\gcc-c++11.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\..\.github\workflows\gcc-c++14.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\..\.github\workflows\gcc-c++17.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\..\.github\workflows\gcc-c++20.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Text Include="..\..\support\Release notes.txt">
Expand Down

0 comments on commit 279a59f

Please sign in to comment.