mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Mark uninitialized use from std library (#1349)
* Print test names at test time (#1343) * Mark uninitialized use from std library Similar to other cases, adds compiler pragmas against warnings caused by std library in optimized builds of tests --------- Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
This commit is contained in:
parent
2f6a3e04aa
commit
add42b6c87
@ -375,6 +375,7 @@ namespace etl
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
#include "private/diagnostic_uninitialized_push.h"
|
||||
//********************************************
|
||||
template <typename TType>
|
||||
bool add_new_message_type(etl::imessage&& msg)
|
||||
@ -390,6 +391,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
typename etl::aligned_storage<SIZE, ALIGNMENT>::type data;
|
||||
bool valid;
|
||||
|
||||
@ -363,6 +363,7 @@ namespace etl
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
#include "private/diagnostic_uninitialized_push.h"
|
||||
//********************************************
|
||||
template <typename TType>
|
||||
bool add_new_message_type(etl::imessage&& msg)
|
||||
@ -378,6 +379,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
typename etl::aligned_storage<SIZE, ALIGNMENT>::type data;
|
||||
bool valid;
|
||||
|
||||
@ -713,6 +713,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// get_token
|
||||
//***************************************************************************
|
||||
#include "private/diagnostic_uninitialized_push.h"
|
||||
template <typename TInput, typename TStringView>
|
||||
etl::optional<TStringView> get_token(const TInput& input, typename TInput::const_pointer delimiters, const etl::optional<TStringView>& last_view, bool ignore_empty_tokens)
|
||||
{
|
||||
@ -755,6 +756,7 @@ namespace etl
|
||||
|
||||
return etl::optional<TStringView>(view);
|
||||
}
|
||||
#include "private/diagnostic_pop.h"
|
||||
|
||||
//***************************************************************************
|
||||
/// get_token_list
|
||||
|
||||
@ -513,6 +513,7 @@ namespace
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
TEST_FIXTURE(SetupFixture, test_front)
|
||||
{
|
||||
Compare_Data compare_data(initial_data.begin(), initial_data.end());
|
||||
@ -523,8 +524,10 @@ namespace
|
||||
Data emptyData;
|
||||
CHECK_THROW(emptyData.front(), etl::vector_out_of_bounds);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
TEST_FIXTURE(SetupFixture, test_front_const)
|
||||
{
|
||||
const Compare_Data compare_data(initial_data.begin(), initial_data.end());
|
||||
@ -535,6 +538,7 @@ namespace
|
||||
const Data emptyData;
|
||||
CHECK_THROW(emptyData.front(), etl::vector_out_of_bounds);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_back)
|
||||
@ -998,6 +1002,7 @@ namespace
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
TEST_FIXTURE(SetupFixture, test_insert_position_n_value_outofbounds)
|
||||
{
|
||||
const int INITIAL_VALUE = 0;
|
||||
@ -1007,6 +1012,7 @@ namespace
|
||||
|
||||
CHECK_THROW(data.insert(data2.end(), 1, INITIAL_VALUE);, etl::vector_out_of_bounds);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_position_n_value_excess)
|
||||
@ -1062,6 +1068,7 @@ namespace
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
#include "etl/private/diagnostic_uninitialized_push.h"
|
||||
TEST_FIXTURE(SetupFixture, test_insert_position_range_out_of_bounds)
|
||||
{
|
||||
Data data;
|
||||
@ -1069,6 +1076,7 @@ namespace
|
||||
|
||||
CHECK_THROW(data.insert(data2.end(), insert_data.cbegin(), insert_data.cend());, etl::vector_out_of_bounds);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_insert_position_range_excess)
|
||||
|
||||
@ -1022,6 +1022,7 @@ namespace
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
#include "etl/private/diagnostic_array_bounds_push.h"
|
||||
TEST(test_emplace_out_of_range_before_begin)
|
||||
{
|
||||
DataNDC data;
|
||||
@ -1032,6 +1033,7 @@ namespace
|
||||
|
||||
CHECK_THROW(data.emplace(it, INITIAL_VALUE), etl::vector_out_of_bounds);
|
||||
}
|
||||
#include "etl/private/diagnostic_pop.h"
|
||||
|
||||
//*************************************************************************
|
||||
#include "etl/private/diagnostic_array_bounds_push.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user