Restored full units test permutations

Fixed unit test for non-virtual message_packet
This commit is contained in:
John Wellbelove 2025-02-17 12:45:32 +00:00
parent baf12b1fcb
commit d1e5112e2a
3 changed files with 401 additions and 20 deletions

View File

@ -186,6 +186,77 @@ etl_version=$(echo $etl_version_raw | sed -e 's/\r//g') # Remove trailing \r
gcc_compiler=$(g++ --version | grep g++)
clang_compiler=$(clang++ --version | grep clang)
#******************************************************************************
# GCC
#******************************************************************************
if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$gcc_compiler
SetConfigurationName "STL"
PrintHeader
rm * -rf
cmake -DCMAKE_C_COMPILER="gcc" -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize -DETL_MESSAGES_ARE_NOT_VIRTUAL=OFF ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$gcc_compiler
SetConfigurationName "STL - Non-virtual messages"
PrintHeader
rm * -rf
cmake -DCMAKE_C_COMPILER="gcc" -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize -DETL_MESSAGES_ARE_NOT_VIRTUAL=ON ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$gcc_compiler
SetConfigurationName "STL - Force C++03"
PrintHeader
rm * -rf
cmake -DCMAKE_C_COMPILER="gcc" -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize -DETL_MESSAGES_ARE_NOT_VIRTUAL=OFF ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$gcc_compiler
@ -235,6 +306,50 @@ fi
#******************************************************************************
# CLANG
#******************************************************************************
if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$clang_compiler
SetConfigurationName "STL"
PrintHeader
rm * -rf
cmake -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize -DETL_MESSAGES_ARE_NOT_VIRTUAL=OFF ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$clang_compiler
SetConfigurationName "STL - Force C++03"
PrintHeader
rm * -rf
cmake -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize -DETL_MESSAGES_ARE_NOT_VIRTUAL=OFF ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then
@ -282,6 +397,262 @@ else
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$gcc_compiler
SetConfigurationName "Initializer list test"
PrintHeader
cd ../etl_initializer_list/
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
cmake -DCMAKE_C_COMPILER="gcc" -DCMAKE_C_COMPILER="gcc" -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$clang_compiler
SetConfigurationName "Initializer list test"
PrintHeader
rm * -rf
cmake -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$gcc_compiler
SetConfigurationName "Error macros 'log_errors' test"
PrintHeader
cd ../../etl_error_handler/log_errors
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
cmake -DCMAKE_C_COMPILER="gcc" -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$gcc_compiler
SetConfigurationName "Error macros 'exceptions' test"
PrintHeader
cd ../../../etl_error_handler/exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
cmake -DCMAKE_C_COMPILER="gcc" -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$gcc_compiler
SetConfigurationName "Error macros 'log_errors and exceptions' test"
PrintHeader
cd ../../../etl_error_handler/log_errors_and_exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
cmake -DCMAKE_C_COMPILER="gcc" -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "gcc" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$gcc_compiler
SetConfigurationName "Error macros 'assert function' test"
PrintHeader
cd ../../../etl_error_handler/assert_function
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
cmake -DCMAKE_C_COMPILER="gcc" -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$clang_compiler
SetConfigurationName "Error macros 'log_errors' test"
PrintHeader
cd ../../../etl_error_handler/log_errors
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
cmake -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$clang_compiler
SetConfigurationName "Error macros 'exceptions' test"
PrintHeader
cd ../../../etl_error_handler/exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
cmake -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$clang_compiler
SetConfigurationName "Error macros 'log_errors and exceptions' test"
PrintHeader
cd ../../../etl_error_handler/log_errors_and_exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
cmake -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
#******************************************************************************
if [ "$compiler_enabled" = "clang" ] || [ "$compiler_enabled" = "All compilers" ]; then
compiler=$clang_compiler
SetConfigurationName "Error macros 'assert function' test"
PrintHeader
cd ../../../etl_error_handler/assert_function
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
cmake -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard -DETL_ENABLE_SANITIZER=$sanitize ..
cmake --build .
if [ $? -eq 0 ]; then
PassedCompilation
else
FailedCompilation
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
PassedTests
else
FailedTests
exit $?
fi
fi
cd ../..

View File

@ -50,21 +50,24 @@ namespace
struct Message1 : public etl::message<MESSAGE1>
{
Message1(int x_)
: x(x_)
: etl::message<MESSAGE1>()
, x(x_)
, moved(false)
, copied(false)
{
}
Message1(const Message1& other)
: x(other.x)
: etl::message<MESSAGE1>()
, x(other.x)
, moved(false)
, copied(true)
{
}
Message1(Message1&& other)
: x(std::move(other.x))
: etl::message<MESSAGE1>()
, x(std::move(other.x))
, moved(true)
, copied(false)
{
@ -94,21 +97,24 @@ namespace
struct Message2 : public etl::message<MESSAGE2>
{
Message2(double x_)
: x(x_)
: etl::message<MESSAGE2>()
, x(x_)
, moved(false)
, copied(false)
{
}
Message2(const Message2& other)
: x(other.x)
: etl::message<MESSAGE2>()
, x(other.x)
, moved(false)
, copied(true)
{
}
Message2(Message2&& other)
: x(std::move(other.x))
: etl::message<MESSAGE2>()
, x(std::move(other.x))
, moved(true)
, copied(false)
{
@ -138,28 +144,32 @@ namespace
struct Message3 : public etl::message<MESSAGE3>
{
Message3(const std::string& x_)
: x(x_)
: etl::message<MESSAGE3>()
, x(x_)
, moved(false)
, copied(false)
{
}
Message3(std::string&& x_)
: x(std::move(x_))
: etl::message<MESSAGE3>()
, x(std::move(x_))
, moved(true)
, copied(false)
{
}
Message3(const Message3& other)
: x(other.x)
: etl::message<MESSAGE3>()
, x(other.x)
, moved(false)
, copied(true)
{
}
Message3(Message3&& other)
: x(std::move(other.x))
: etl::message<MESSAGE3>()
, x(std::move(other.x))
, moved(true)
, copied(false)
{

View File

@ -3410,12 +3410,6 @@
<ClCompile Include="..\syntax_check\uncopyable.h.t.cpp">
<Filter>Tests\Syntax Checks\Source</Filter>
</ClCompile>
<ClCompile Include="..\syntax_check\singleton_base.h.t.cpp">
<Filter>Tests</Filter>
</ClCompile>
<ClCompile Include="..\test_singleton_base.cpp">
<Filter>Tests</Filter>
</ClCompile>
<ClCompile Include="..\test_unaligned_type_ext.cpp">
<Filter>Tests\Types</Filter>
</ClCompile>
@ -3425,11 +3419,17 @@
<ClCompile Include="..\etl_error_handler\assert_function\test_error_handler.cpp">
<Filter>Tests\Error Handler\Assert Function</Filter>
</ClCompile>
<ClCompile Include="..\syntax_check\function_traits.h.t.cpp">
<Filter>Tests</Filter>
</ClCompile>
<ClCompile Include="..\test_function_traits.cpp">
<Filter>Tests</Filter>
<Filter>Tests\Types</Filter>
</ClCompile>
<ClCompile Include="..\test_singleton_base.cpp">
<Filter>Tests\Patterns</Filter>
</ClCompile>
<ClCompile Include="..\syntax_check\function_traits.h.t.cpp">
<Filter>Tests\Syntax Checks\Source</Filter>
</ClCompile>
<ClCompile Include="..\syntax_check\singleton_base.h.t.cpp">
<Filter>Tests\Syntax Checks\Source</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>