mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 22:59:47 +08:00
Merge remote-tracking branch 'origin/development'
# Conflicts: # library.properties # src/container.h # test/codeblocks/ETL.layout # test/test_flat_multimap.cpp # test/test_flat_multiset.cpp # test/test_flat_set.cpp # test/test_forward_list.cpp
This commit is contained in:
parent
0884cf81d5
commit
865d837011
@ -1,5 +1,5 @@
|
||||
name=Embedded Template Library
|
||||
version=10.12.1
|
||||
version=10.13.0
|
||||
author= John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
|
||||
sentence=A C++ template library tailored for embedded systems.
|
||||
|
||||
11
src/deque.h
11
src/deque.h
@ -622,6 +622,17 @@ namespace etl
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~ideque()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Assigns a range to the deque.
|
||||
//*************************************************************************
|
||||
|
||||
@ -108,6 +108,17 @@ namespace etl
|
||||
|
||||
public:
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iflat_map()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the flat_map.
|
||||
///\return An iterator to the beginning of the flat_map.
|
||||
|
||||
@ -110,6 +110,17 @@ namespace etl
|
||||
|
||||
public:
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iflat_multimap()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the flat_multimap.
|
||||
///\return An iterator to the beginning of the flat_multimap.
|
||||
|
||||
@ -86,6 +86,17 @@ namespace etl
|
||||
|
||||
public:
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iflat_multiset()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the flat_multiset.
|
||||
///\return An iterator to the beginning of the flat_multiset.
|
||||
|
||||
@ -86,6 +86,17 @@ namespace etl
|
||||
|
||||
public:
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iflat_set()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the flat_set.
|
||||
///\return An iterator to the beginning of the flat_set.
|
||||
|
||||
@ -477,6 +477,17 @@ namespace etl
|
||||
|
||||
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iforward_list()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the beginning of the forward_list.
|
||||
//*************************************************************************
|
||||
|
||||
@ -31,6 +31,8 @@ SOFTWARE.
|
||||
#ifndef __ETL_INSTANCE_COUNT__
|
||||
#define __ETL_INSTANCE_COUNT__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
///\defgroup instance_count instance count
|
||||
@ -52,33 +54,52 @@ namespace etl
|
||||
//*************************************************************************
|
||||
instance_count()
|
||||
{
|
||||
++how_many;
|
||||
++how_many();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Copy construct and add 1.
|
||||
//*************************************************************************
|
||||
instance_count(const instance_count&)
|
||||
{
|
||||
++how_many();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Destruct and subtract 1.
|
||||
//*************************************************************************
|
||||
virtual ~instance_count()
|
||||
~instance_count()
|
||||
{
|
||||
--how_many;
|
||||
--how_many();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Get how many instances we have.
|
||||
//*************************************************************************
|
||||
inline static size_t get_instance_count()
|
||||
inline static int32_t get_instance_count()
|
||||
{
|
||||
return how_many;
|
||||
return how_many();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Get how many instances we have.
|
||||
//*************************************************************************
|
||||
inline static void reset_instance_count()
|
||||
{
|
||||
how_many() = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
/// The count for this type.
|
||||
static size_t how_many;
|
||||
//*************************************************************************
|
||||
/// Get a referenceto the count.
|
||||
//*************************************************************************
|
||||
inline static int32_t& how_many()
|
||||
{
|
||||
static int32_t count = 0;
|
||||
return count;
|
||||
}
|
||||
};
|
||||
|
||||
/// Initialisation.
|
||||
template <typename T> size_t instance_count<T>::how_many = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
11
src/list.h
11
src/list.h
@ -583,6 +583,17 @@ namespace etl
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~ilist()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the beginning of the list.
|
||||
//*************************************************************************
|
||||
|
||||
10
src/map.h
10
src/map.h
@ -801,6 +801,16 @@ namespace etl
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~imap()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the beginning of the map.
|
||||
|
||||
@ -952,6 +952,16 @@ namespace etl
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~imultimap()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the beginning of the multimap.
|
||||
|
||||
@ -932,6 +932,16 @@ namespace etl
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~imultiset()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the beginning of the multiset.
|
||||
|
||||
11
src/queue.h
11
src/queue.h
@ -239,6 +239,17 @@ namespace etl
|
||||
|
||||
public:
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iqueue()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a reference to the value at the front of the queue.<br>
|
||||
/// \return A reference to the value at the front of the queue.
|
||||
|
||||
11
src/set.h
11
src/set.h
@ -786,6 +786,17 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iset()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the beginning of the set.
|
||||
//*************************************************************************
|
||||
|
||||
11
src/stack.h
11
src/stack.h
@ -230,6 +230,17 @@ namespace etl
|
||||
|
||||
public:
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~istack()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a reference to the value at the top of the stack.<br>
|
||||
/// \return A reference to the value at the top of the stack.
|
||||
|
||||
@ -480,6 +480,17 @@ namespace etl
|
||||
|
||||
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iunordered_map()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the unordered_map.
|
||||
///\return An iterator to the beginning of the unordered_map.
|
||||
|
||||
@ -480,6 +480,17 @@ namespace etl
|
||||
|
||||
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iunordered_multimap()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the unordered_multimap.
|
||||
///\return An iterator to the beginning of the unordered_multimap.
|
||||
|
||||
@ -475,6 +475,17 @@ namespace etl
|
||||
|
||||
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iunordered_multiset()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the unordered_multiset.
|
||||
///\return An iterator to the beginning of the unordered_multiset.
|
||||
|
||||
@ -476,6 +476,17 @@ namespace etl
|
||||
|
||||
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~iunordered_set()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the unordered_set.
|
||||
///\return An iterator to the beginning of the unordered_set.
|
||||
|
||||
11
src/vector.h
11
src/vector.h
@ -93,6 +93,17 @@ namespace etl
|
||||
|
||||
public:
|
||||
|
||||
//*************************************************************************
|
||||
/// Destructor.
|
||||
//*************************************************************************
|
||||
~ivector()
|
||||
{
|
||||
if (!empty())
|
||||
{
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the vector.
|
||||
///\return An iterator to the beginning of the vector.
|
||||
|
||||
1
test/codeblocks/.gitignore
vendored
1
test/codeblocks/.gitignore
vendored
@ -2,3 +2,4 @@ random_*.csv
|
||||
/ETL.depend
|
||||
/ETL.layout
|
||||
*.depend
|
||||
*.layout
|
||||
|
||||
@ -1,550 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_layout_file>
|
||||
<FileVersion major="1" minor="0" />
|
||||
<ActiveTarget name="Windows" />
|
||||
<File name="..\..\unittest-cpp\UnitTest++\HelperMacros.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="35" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\unordered_multiset.h" open="0" top="0" tabpos="67" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="25789" topLine="730" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\reference_flat_multiset.h" open="0" top="0" tabpos="32" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6534" topLine="199" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_type_traits.cpp" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="37662" topLine="472" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_algorithm.cpp" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2243" topLine="43" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\array.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1970" topLine="47" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_flat_multimap.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3425" topLine="85" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\platform.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1621" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_array.cpp" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="9271" topLine="318" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\armv5.h" open="0" top="0" tabpos="76" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1889" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_string_char.cpp" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="21608" topLine="677" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_fsm.cpp" open="0" top="0" tabpos="40" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7419" topLine="228" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\pool.h" open="0" top="0" tabpos="31" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="15670" topLine="382" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\frame_check_sequence.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4943" topLine="79" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\flat_multimap.h" open="0" top="0" tabpos="30" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="24090" topLine="583" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\array_wrapper.h" open="1" top="1" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4244" topLine="93" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\u16string.h" open="0" top="0" tabpos="51" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3035" topLine="57" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\reference_flat_multimap.h" open="0" top="0" tabpos="29" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5897" topLine="182" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\deque.h" open="0" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="67409" topLine="1989" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\message_router.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5518" topLine="138" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\etl_profile.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="853" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\set.h" open="0" top="0" tabpos="64" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="18154" topLine="461" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\private\ivectorpointer.h" open="0" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="18646" topLine="415" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\data.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2648" topLine="75" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\intrusive_flat_map.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4065" topLine="242" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\gcc_linux_x86.h" open="0" top="0" tabpos="82" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1735" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\error_handler.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2935" topLine="56" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\optional.h" open="0" top="0" tabpos="60" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4686" topLine="111" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\bitset.h" open="0" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="19345" topLine="665" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\unittest-cpp\UnitTest++\Checks.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="493" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\reference_flat_map.h" open="0" top="0" tabpos="27" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6877" topLine="207" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_intrusive_queue.cpp" open="0" top="0" tabpos="63" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1641" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_packet.cpp" open="0" top="0" tabpos="53" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1942" topLine="39" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\multimap.h" open="0" top="0" tabpos="46" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7557" topLine="193" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_binary.cpp" open="0" top="0" tabpos="89" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="47560" topLine="1228" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\intrusive_list.h" open="0" top="0" tabpos="41" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="33670" topLine="1023" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\user_type.h" open="0" top="0" tabpos="70" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5459" topLine="68" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_task_scheduler.cpp" open="0" top="0" tabpos="65" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2139" topLine="52" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\io_port.h" open="0" top="0" tabpos="42" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4011" topLine="132" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\unordered_multimap.h" open="0" top="0" tabpos="66" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="33847" topLine="959" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\msvc_x86.h" open="0" top="0" tabpos="73" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1761" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_list.cpp" open="0" top="0" tabpos="44" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2306" topLine="12" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\map.h" open="0" top="0" tabpos="59" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7462" topLine="200" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\static_assert.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1460" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\callback_timer.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="16444" topLine="558" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\unittest-cpp\UnitTest++\Checks.cpp" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_intrusive_links.cpp" open="0" top="0" tabpos="39" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="39889" topLine="1110" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\function.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="13069" topLine="359" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\cpp14.h" open="0" top="0" tabpos="80" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1888" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_intrusive_forward_list.cpp" open="0" top="0" tabpos="36" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="37971" topLine="942" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_string_u16.cpp" open="0" top="0" tabpos="52" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="21098" topLine="685" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\message_bus.h" open="0" top="0" tabpos="86" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="9567" topLine="248" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\flat_set.h" open="0" top="0" tabpos="34" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="18892" topLine="471" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\list.h" open="0" top="0" tabpos="43" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11472" topLine="283" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\unittest-cpp\UnitTest++\Posix\SignalTranslator.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1062" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_intrusive_stack.cpp" open="0" top="0" tabpos="58" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1641" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\cpp03.h" open="0" top="0" tabpos="78" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1891" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_pearson.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1707" topLine="29" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\exception.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3744" topLine="51" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\main.cpp" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="141" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\vector.h" open="0" top="0" tabpos="83" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="832" topLine="7" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\reference_flat_set.h" open="0" top="0" tabpos="35" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6404" topLine="199" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_error_handler.cpp" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2281" topLine="4" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\pearson.h" open="0" top="0" tabpos="49" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4500" topLine="94" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\binary.h" open="0" top="0" tabpos="90" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="14862" topLine="310" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\unittest-cpp\UnitTest++\MemoryOutStream.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="178" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\arduino_arm.h" open="0" top="0" tabpos="75" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1881" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\flat_map.h" open="0" top="0" tabpos="28" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10984" topLine="246" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\cpp11.h" open="0" top="0" tabpos="79" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1888" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\cstring.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4190" topLine="27" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\u32string.h" open="0" top="0" tabpos="54" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6674" topLine="103" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_callback_timer.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5922" topLine="109" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\variant.h" open="0" top="0" tabpos="69" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="33022" topLine="747" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\private\vector_base.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5342" topLine="94" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_string_u32.cpp" open="0" top="0" tabpos="56" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="21412" topLine="691" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_checksum.cpp" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="218" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\unordered_set.h" open="0" top="0" tabpos="68" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="24920" topLine="711" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\stack.h" open="0" top="0" tabpos="50" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5893" topLine="104" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\enum_type.h" open="0" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3810" topLine="60" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_exception.cpp" open="0" top="0" tabpos="38" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2177" topLine="8" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\queue.h" open="0" top="0" tabpos="48" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5750" topLine="102" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\unittest-cpp\UnitTest++\Win32\TimeHelpers.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="775" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\fsm.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="9501" topLine="262" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\gcc_windows_x86.h" open="0" top="0" tabpos="74" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1761" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\message_timer.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="14673" topLine="484" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_array_view.cpp" open="0" top="0" tabpos="91" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="17474" topLine="550" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\type_traits.h" open="0" top="0" tabpos="72" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="12" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_string_wchar_t.cpp" open="0" top="0" tabpos="57" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="21101" topLine="685" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\unittest-cpp\UnitTest++\CheckMacros.h" open="0" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="19645" topLine="116" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_message_bus.cpp" open="0" top="0" tabpos="87" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4035" topLine="143" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_message_timer.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3030" topLine="92" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\wstring.h" open="0" top="0" tabpos="55" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5149" topLine="104" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\type_def.h" open="0" top="0" tabpos="61" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2398" topLine="38" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\basic_string.h" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="66388" topLine="1848" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\gcc_generic.h" open="0" top="0" tabpos="81" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1738" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_message_router.cpp" open="0" top="0" tabpos="88" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4827" topLine="140" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\memory.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2221" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\flat_multiset.h" open="0" top="0" tabpos="33" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11498" topLine="256" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\unordered_map.h" open="0" top="0" tabpos="62" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="19759" topLine="537" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\string_view.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="20498" topLine="537" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\murmur3.h" open="0" top="0" tabpos="47" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2487" topLine="52" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\fixed_iterator.h" open="0" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2474" topLine="34" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\armv6.h" open="0" top="0" tabpos="77" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1890" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\forward_list.h" open="0" top="0" tabpos="37" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10238" topLine="270" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\profiles\ticc.h" open="0" top="0" tabpos="84" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1902" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_variant.cpp" open="0" top="0" tabpos="71" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7555" topLine="221" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_endian.cpp" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1392" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_string_view.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="30686" topLine="816" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\multiset.h" open="0" top="0" tabpos="45" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7599" topLine="193" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
||||
@ -31,11 +31,13 @@ SOFTWARE.
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#include "instance_count.h"
|
||||
|
||||
//*****************************************************************************
|
||||
// Default constructor.
|
||||
//*****************************************************************************
|
||||
template <typename T>
|
||||
class TestDataDC
|
||||
class TestDataDC : public etl::instance_count<TestDataDC<T>>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -88,7 +90,7 @@ std::ostream& operator << (std::ostream& s, const TestDataDC<T>& rhs)
|
||||
// No default constructor.
|
||||
//*****************************************************************************
|
||||
template <typename T>
|
||||
class TestDataNDC
|
||||
class TestDataNDC : public etl::instance_count<TestDataNDC<T>>
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@ -107,6 +107,19 @@ namespace
|
||||
CHECK(std::equal(compare_data.begin(), compare_data.end(), data.begin()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_ideque)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(SIZE, N999);
|
||||
CHECK_EQUAL(int(current_count + SIZE), NDC::get_instance_count());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
CHECK_EQUAL(current_count, NDC::get_instance_count());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_constructor_fill_excess)
|
||||
{
|
||||
|
||||
@ -238,6 +238,19 @@ namespace
|
||||
CHECK_EQUAL(data.max_size(), SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_iflat_map)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
CHECK_EQUAL(int(current_count + initial_data.size()), NDC::get_instance_count());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
CHECK_EQUAL(current_count, NDC::get_instance_count());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_range)
|
||||
{
|
||||
|
||||
@ -197,6 +197,19 @@ namespace
|
||||
CHECK_EQUAL(data.max_size(), SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_iflat_multimap)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
CHECK_EQUAL(int(current_count + initial_data.size()), NDC::get_instance_count());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
CHECK_EQUAL(current_count, NDC::get_instance_count());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_range)
|
||||
{
|
||||
@ -499,7 +512,7 @@ namespace
|
||||
DataNDC data(compare_data.begin(), compare_data.end());
|
||||
data.clear();
|
||||
CHECK_EQUAL(data.size(), size_t(0));
|
||||
|
||||
|
||||
// Do it again to check that clear() didn't screw up the internals.
|
||||
data.assign(compare_data.begin(), compare_data.end());
|
||||
CHECK_EQUAL(data.size(), compare_data.size());
|
||||
|
||||
@ -154,6 +154,19 @@ namespace
|
||||
CHECK_EQUAL(data.max_size(), SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_iflat_multiset)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
CHECK_EQUAL(int(current_count + initial_data.size()), NDC::get_instance_count());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
CHECK_EQUAL(current_count, NDC::get_instance_count());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_range)
|
||||
{
|
||||
|
||||
@ -147,6 +147,19 @@ namespace
|
||||
CHECK_EQUAL(data.max_size(), SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_iflat_set)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
CHECK_EQUAL(int(current_count + initial_data.size()), NDC::get_instance_count());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
CHECK_EQUAL(current_count, NDC::get_instance_count());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_range)
|
||||
{
|
||||
|
||||
@ -129,6 +129,19 @@ namespace
|
||||
CHECK(!data.empty());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_iforward_list)
|
||||
{
|
||||
int current_count = ItemNDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(sorted_data.begin(), sorted_data.end());
|
||||
CHECK_EQUAL(int(current_count + sorted_data.size()), ItemNDC::get_instance_count());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
CHECK_EQUAL(current_count, ItemNDC::get_instance_count());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_copy_constructor)
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@ SOFTWARE.
|
||||
#include <numeric>
|
||||
|
||||
namespace
|
||||
{
|
||||
{
|
||||
SUITE(test_instance_count)
|
||||
{
|
||||
//*************************************************************************
|
||||
@ -47,25 +47,29 @@ namespace
|
||||
struct Test2 : public etl::instance_count<Test2>
|
||||
{};
|
||||
|
||||
CHECK_EQUAL(0U, Test1::get_instance_count());
|
||||
CHECK_EQUAL(0U, Test2::get_instance_count());
|
||||
CHECK_EQUAL(0, Test1::get_instance_count());
|
||||
CHECK_EQUAL(0, Test2::get_instance_count());
|
||||
|
||||
Test1 test1a;
|
||||
CHECK_EQUAL(1U, Test1::get_instance_count());
|
||||
CHECK_EQUAL(0U, Test2::get_instance_count());
|
||||
CHECK_EQUAL(1, Test1::get_instance_count());
|
||||
CHECK_EQUAL(0, Test2::get_instance_count());
|
||||
|
||||
Test1 test1b;
|
||||
Test2 test2a;
|
||||
CHECK_EQUAL(2U, Test1::get_instance_count());
|
||||
CHECK_EQUAL(1U, Test2::get_instance_count());
|
||||
CHECK_EQUAL(2, Test1::get_instance_count());
|
||||
CHECK_EQUAL(1, Test2::get_instance_count());
|
||||
|
||||
Test2* ptest2b = new Test2;
|
||||
CHECK_EQUAL(2U, Test1::get_instance_count());
|
||||
CHECK_EQUAL(2U, Test2::get_instance_count());
|
||||
CHECK_EQUAL(2, Test1::get_instance_count());
|
||||
CHECK_EQUAL(2, Test2::get_instance_count());
|
||||
|
||||
Test2 test2c(test2a);
|
||||
CHECK_EQUAL(2, Test1::get_instance_count());
|
||||
CHECK_EQUAL(3, Test2::get_instance_count());
|
||||
|
||||
delete ptest2b;
|
||||
CHECK_EQUAL(2U, Test1::get_instance_count());
|
||||
CHECK_EQUAL(1U, Test2::get_instance_count());
|
||||
CHECK_EQUAL(2, Test1::get_instance_count());
|
||||
CHECK_EQUAL(2, Test2::get_instance_count());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -100,6 +100,19 @@ namespace
|
||||
CHECK_EQUAL(data.max_size(), SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_ilist)
|
||||
{
|
||||
int current_count = ItemNDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(sorted_data.begin(), sorted_data.end());
|
||||
CHECK_EQUAL(int(current_count + sorted_data.size()), ItemNDC::get_instance_count());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
CHECK_EQUAL(current_count, ItemNDC::get_instance_count());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_size)
|
||||
{
|
||||
|
||||
@ -183,6 +183,15 @@ namespace
|
||||
CHECK_EQUAL(data.max_size(), MAX_SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_destruct_via_imap)
|
||||
{
|
||||
Data* pdata = new Data(initial_data.begin(), initial_data.end());
|
||||
|
||||
IData* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_range)
|
||||
{
|
||||
|
||||
@ -183,6 +183,15 @@ namespace
|
||||
CHECK_EQUAL(data.max_size(), MAX_SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_destruct_via_imultimap)
|
||||
{
|
||||
Data* pdata = new Data(initial_data.begin(), initial_data.end());
|
||||
|
||||
IData* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_range)
|
||||
{
|
||||
|
||||
@ -175,6 +175,15 @@ namespace
|
||||
CHECK_EQUAL(data.max_size(), MAX_SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_destruct_via_imultiset)
|
||||
{
|
||||
Data* pdata = new Data(initial_data.begin(), initial_data.end());
|
||||
|
||||
IData* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_range)
|
||||
{
|
||||
|
||||
@ -78,6 +78,23 @@ namespace
|
||||
CHECK_EQUAL(priority_queue.max_size(), SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_delete_via_ipriority_queue)
|
||||
{
|
||||
typedef etl::priority_queue<int, 4> priority_queue_t;
|
||||
|
||||
priority_queue_t* ppriority_queue = new etl::priority_queue<int, 4>;
|
||||
|
||||
etl::ipriority_queue<int, priority_queue_t::container_type, priority_queue_t::compare_type>* pipriority_queue = ppriority_queue;
|
||||
|
||||
pipriority_queue->push(1);
|
||||
pipriority_queue->push(2);
|
||||
pipriority_queue->push(3);
|
||||
pipriority_queue->push(4);
|
||||
|
||||
delete pipriority_queue;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_copy_constructor)
|
||||
{
|
||||
|
||||
@ -97,6 +97,21 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_delete_via_iqueue)
|
||||
{
|
||||
etl::queue<int, 4>* pqueue = new etl::queue<int, 4>;
|
||||
|
||||
etl::iqueue<int>* piqueue = pqueue;
|
||||
|
||||
piqueue->push(1);
|
||||
piqueue->push(2);
|
||||
piqueue->push(3);
|
||||
piqueue->push(4);
|
||||
|
||||
delete piqueue;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_size)
|
||||
{
|
||||
|
||||
@ -227,6 +227,17 @@ namespace
|
||||
CHECK(!data.empty());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_ireference_flat_map)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_begin)
|
||||
{
|
||||
|
||||
@ -185,6 +185,17 @@ namespace
|
||||
CHECK(!data.empty());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_ireference_flat_multimap)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_begin)
|
||||
{
|
||||
|
||||
@ -171,6 +171,17 @@ namespace
|
||||
CHECK(!data.empty());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_ireference_flat_multiset)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_begin)
|
||||
{
|
||||
|
||||
@ -167,6 +167,17 @@ namespace
|
||||
CHECK(!data.empty());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_ireference_flat_set)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_begin)
|
||||
{
|
||||
|
||||
@ -186,6 +186,15 @@ namespace
|
||||
CHECK_EQUAL(data.max_size(), MAX_SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_destruct_via_iset)
|
||||
{
|
||||
Data* pdata = new Data(initial_data.begin(), initial_data.end());
|
||||
|
||||
IData* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_constructor_range)
|
||||
{
|
||||
|
||||
@ -102,6 +102,21 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_delete_via_istack)
|
||||
{
|
||||
etl::stack<int, 4>* pstack = new etl::stack<int, 4>;
|
||||
|
||||
etl::istack<int>* pistack = pstack;
|
||||
|
||||
pistack->push(1);
|
||||
pistack->push(2);
|
||||
pistack->push(3);
|
||||
pistack->push(4);
|
||||
|
||||
delete pistack;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_empty)
|
||||
{
|
||||
|
||||
@ -231,6 +231,17 @@ namespace
|
||||
CHECK(data.full());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_iunordered_map)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment)
|
||||
{
|
||||
|
||||
@ -208,6 +208,17 @@ namespace
|
||||
CHECK(data.full());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_iunordered_multimap)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment)
|
||||
{
|
||||
|
||||
@ -142,6 +142,17 @@ namespace
|
||||
CHECK(data.full());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_iunordered_multiset)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment)
|
||||
{
|
||||
|
||||
@ -134,6 +134,17 @@ namespace
|
||||
CHECK(data.full());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_destruct_via_iunordered_set)
|
||||
{
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(initial_data.begin(), initial_data.end());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_assignment)
|
||||
{
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include "data.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
{
|
||||
SUITE(test_vector_non_trivial)
|
||||
{
|
||||
static const size_t SIZE = 10;
|
||||
@ -44,6 +44,8 @@ namespace
|
||||
typedef TestDataNDC<std::string> NDC;
|
||||
typedef TestDataDC<std::string> DC;
|
||||
|
||||
static NDC ndc("NDC");
|
||||
|
||||
typedef etl::vector<NDC, SIZE> DataNDC;
|
||||
typedef etl::ivector<NDC> IDataNDC;
|
||||
typedef std::vector<NDC> CompareDataNDC;
|
||||
@ -51,7 +53,7 @@ namespace
|
||||
typedef etl::vector<DC, SIZE> DataDC;
|
||||
typedef etl::ivector<DC> IDataDC;
|
||||
typedef std::vector<DC> CompareDataDC;
|
||||
|
||||
|
||||
CompareDataNDC initial_data;
|
||||
CompareDataNDC less_data;
|
||||
CompareDataNDC greater_data;
|
||||
@ -89,6 +91,22 @@ namespace
|
||||
CHECK_EQUAL(data.max_size(), SIZE);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_destruct_via_ivector)
|
||||
{
|
||||
const size_t INITIAL_SIZE = 5;
|
||||
const NDC INITIAL_VALUE("1");
|
||||
|
||||
int current_count = NDC::get_instance_count();
|
||||
|
||||
DataNDC* pdata = new DataNDC(INITIAL_SIZE, INITIAL_VALUE);
|
||||
CHECK_EQUAL(int(current_count + INITIAL_SIZE), NDC::get_instance_count());
|
||||
|
||||
IDataNDC* pidata = pdata;
|
||||
delete pidata;
|
||||
CHECK_EQUAL(current_count, NDC::get_instance_count());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_iterator_comparison_empty)
|
||||
{
|
||||
@ -152,7 +170,7 @@ namespace
|
||||
DataNDC data(initial_data.begin(), initial_data.end());
|
||||
DataNDC data2(data);
|
||||
CHECK(data2 == data);
|
||||
|
||||
|
||||
data2[2] = NDC("X");
|
||||
CHECK(data2 != data);
|
||||
}
|
||||
@ -400,7 +418,7 @@ namespace
|
||||
|
||||
CHECK(data.back() == compare_data.back());
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_data)
|
||||
{
|
||||
@ -676,7 +694,7 @@ namespace
|
||||
const size_t INITIAL_SIZE = 5;
|
||||
const size_t INSERT_SIZE = 3;
|
||||
const NDC INITIAL_VALUE("1");
|
||||
|
||||
|
||||
for (size_t offset = 0; offset <= INITIAL_SIZE; ++offset)
|
||||
{
|
||||
CompareDataNDC compare_data;
|
||||
@ -770,7 +788,7 @@ namespace
|
||||
offset = 4;
|
||||
|
||||
CHECK_THROW(data.insert(data.begin() + offset, initial_data.begin(), initial_data.end()), etl::vector_full);
|
||||
|
||||
|
||||
offset = data.size();
|
||||
|
||||
CHECK_THROW(data.insert(data.begin() + offset, initial_data.begin(), initial_data.end()), etl::vector_full);
|
||||
@ -813,7 +831,7 @@ namespace
|
||||
|
||||
CHECK(is_equal);
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_clear)
|
||||
{
|
||||
|
||||
5
test/vs2017/.gitignore
vendored
Normal file
5
test/vs2017/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/random_clcg.csv
|
||||
/random_lcg.csv
|
||||
/random_lsfr.csv
|
||||
/random_mwc.csv
|
||||
/random_xorshift.csv
|
||||
Loading…
x
Reference in New Issue
Block a user