aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-01-03 19:26:33 +0100
committerSven Gothel <[email protected]>2021-01-03 19:26:33 +0100
commiteeaf29bbf1b16100f57d9990336473018b6340a4 (patch)
tree1d11197802c65d083f7b24df58ff7a9626333aeb /test
parent690feccce0eb60792d662993f76ea7ccc21f5395 (diff)
basic_types.hpp: Add jau::type_name_cue<T> and jau::type_cue<T> to support certain compile time typename information w/o RTTI
Diffstat (limited to 'test')
-rw-r--r--test/test_cow_darray_01.cpp10
-rw-r--r--test/test_datatype01.hpp4
2 files changed, 13 insertions, 1 deletions
diff --git a/test/test_cow_darray_01.cpp b/test/test_cow_darray_01.cpp
index 6a1ce85..58e872b 100644
--- a/test/test_cow_darray_01.cpp
+++ b/test/test_cow_darray_01.cpp
@@ -46,7 +46,15 @@ using namespace jau;
static uint8_t start_addr_b[] = {0x20, 0x26, 0x2A, 0x01, 0x20, 0x10};
static Addr48Bit start_addr(start_addr_b);
-typedef std::vector<DataType01, counting_allocator<DataType01>> DataType01Vector;
+typedef std::vector<DataType01, counting_allocator<DataType01>> std_vector_DataType01;
+typedef jau::darray<DataType01, counting_allocator<DataType01>> jau_darray_DataType01;
+typedef jau::cow_vector<DataType01, counting_allocator<DataType01>> jau_cow_vector_DataType01;
+typedef jau::cow_darray<DataType01, counting_allocator<DataType01>> jau_cow_darray_DataType01;
+
+JAU_TYPENAME_CUE_ALL(std_vector_DataType01)
+JAU_TYPENAME_CUE_ALL(jau_darray_DataType01)
+JAU_TYPENAME_CUE_ALL(jau_cow_vector_DataType01)
+JAU_TYPENAME_CUE_ALL(jau_cow_darray_DataType01)
template<class T>
DataType01 * findDataSet01_idx(T& data, DataType01 const & elem) noexcept {
diff --git a/test/test_datatype01.hpp b/test/test_datatype01.hpp
index 1487e62..8a52c02 100644
--- a/test/test_datatype01.hpp
+++ b/test/test_datatype01.hpp
@@ -92,6 +92,8 @@ __pack ( struct Addr48Bit {
}
} );
+JAU_TYPENAME_CUE_ALL(Addr48Bit)
+
inline bool operator==(const Addr48Bit& lhs, const Addr48Bit& rhs) noexcept {
if( &lhs == &rhs ) {
return true;
@@ -163,6 +165,8 @@ class DataType01 {
return "["+address.toString()+", "+std::to_string(type)+"]";
}
};
+JAU_TYPENAME_CUE_ALL(DataType01)
+
inline bool operator==(const DataType01& lhs, const DataType01& rhs) noexcept {
if( &lhs == &rhs ) {
return true;