diff --git a/include/etl/factory.h b/include/etl/deprecated/factory.h similarity index 100% rename from include/etl/factory.h rename to include/etl/deprecated/factory.h diff --git a/include/etl/private/to_string_helper.h b/include/etl/private/to_string_helper.h index 0aa8013d..898ec569 100644 --- a/include/etl/private/to_string_helper.h +++ b/include/etl/private/to_string_helper.h @@ -33,7 +33,7 @@ SOFTWARE. ///\ingroup private -#include +#include #include "../platform.h" #include "../absolute.h" @@ -234,9 +234,9 @@ namespace etl iterator start = str.end(); - if (isnan(value) || isinf(value)) + if (std::isnan(value) || std::isinf(value)) { - etl::private_to_string::add_nan_inf(isnan(value), isinf(value), str); + etl::private_to_string::add_nan_inf(std::isnan(value), std::isinf(value), str); } else { diff --git a/include/etl/to_string.h b/include/etl/to_string.h index 575cb452..7ee633e9 100644 --- a/include/etl/to_string.h +++ b/include/etl/to_string.h @@ -39,8 +39,6 @@ SOFTWARE. #include "format_spec.h" #include "private/to_string_helper.h" -#include - namespace etl { //*************************************************************************** diff --git a/include/etl/version.h b/include/etl/version.h index 5edbdfc9..c54a23e6 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 14 #define ETL_VERSION_MINOR 26 -#define ETL_VERSION_PATCH 6 +#define ETL_VERSION_PATCH 7 #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) ETL_STRINGIFY(ETL_VERSION_MINOR) ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_W ETL_WIDE_STRING(ETL_CONCAT(ETL_CONCAT(ETL_VERSION_MAJOR, ETL_VERSION_MINOR), ETL_VERSION_PATCH)) diff --git a/support/Release notes.txt b/support/Release notes.txt index a50d4076..c5e1ab8c 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +14.26.7 +Compatibility changes for GCC v5.4. + =============================================================================== 14.26.6 Added variadic parameters to observer notification. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 690e669e..950f98b5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -18,7 +18,8 @@ else() # Therefore we update the provide UTPP_INCLUDE_DIRS here set(UTPP_INCLUDE_DIRS "${UTPP_INCLUDE_DIRS}/UnitTest++") endif() -include_directories(${UTPP_INCLUDE_DIRS}) + +include_directories(${UTPP_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/../include) set(TEST_SOURCE_FILES main.cpp @@ -117,6 +118,38 @@ set(TEST_SOURCE_FILES test_visitor.cpp test_xor_checksum.cpp test_xor_rotate_checksum.cpp + test_atomic_std.cpp + test_callback_service.cpp + test_cumulative_moving_average.cpp + test_delegate.cpp + test_delegate_service.cpp + test_forward_list_shared_pool.cpp + test_list_shared_pool.cpp + test_multi_array.cpp + test_no_stl_algorithm.cpp + test_no_stl_functional.cpp + test_no_stl_iterator.cpp + test_no_stl_limits.cpp + test_no_stl_utility.cpp + test_queue_memory_model_small.cpp + test_queue_mpmc_mutex.cpp + test_queue_mpmc_mutex_small.cpp + test_queue_spsc_atomic.cpp + test_queue_spsc_atomic_small.cpp + test_queue_spsc_isr.cpp + test_queue_spsc_isr_small.cpp + test_queue_spsc_locked.cpp + test_queue_spsc_locked_small.cpp + test_scaled_rounding.cpp + test_state_chart.cpp + test_string_view.cpp + test_to_string.cpp + test_to_u16string.cpp + test_to_u32string.cpp + test_to_wstring.cpp + test_type_select.cpp + test_vector_external_buffer.cpp + test_vector_pointer_external_buffer.cpp # Compile the source level ecl_timer here as test has provided a ecl_user.h file ${PROJECT_SOURCE_DIR}/../src/c/ecl_timer.c @@ -132,7 +165,6 @@ if (WIN32) ADD_DEFINITIONS(-D_UNICODE) endif() - if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") list(APPEND TEST_SOURCE_FILES "test_atomic_gcc_sync.cpp") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") @@ -140,7 +172,8 @@ endif() add_executable(etl_tests ${TEST_SOURCE_FILES} ) -target_link_libraries(etl_tests etl UnitTest++) +#target_link_libraries(etl_tests etl UnitTest++) +target_link_libraries(etl_tests UnitTest++) target_include_directories(etl_tests PUBLIC ${CMAKE_CURRENT_LIST_DIR} @@ -155,6 +188,6 @@ add_test(etl_unit_tests etl_tests) add_custom_target(test_verbose COMMAND ${CMAKE_CTEST_COMMAND} --verbose) -# Remaining Tests to be implemented: -#1. Enable embedded compile target testing -# - test_embedded_compile.cpp +#RSG +set_property(TARGET etl_tests PROPERTY CXX_STANDARD 17) + diff --git a/test/test_embedded_compile.cpp b/test/Deprecated/test_embedded_compile.cpp similarity index 100% rename from test/test_embedded_compile.cpp rename to test/Deprecated/test_embedded_compile.cpp diff --git a/test/test_factory.cpp b/test/Deprecated/test_factory.cpp similarity index 100% rename from test/test_factory.cpp rename to test/Deprecated/test_factory.cpp diff --git a/test/test_bit_stream.cpp b/test/test_bit_stream.cpp index 05dd906c..61d949f7 100644 --- a/test/test_bit_stream.cpp +++ b/test/test_bit_stream.cpp @@ -870,7 +870,6 @@ namespace int32_t i2 = -1520786086; // 0xA55AA55A float f = 3.1415927f; double d = 3.1415927; - long double ld = 3.1414927L; std::array storage; @@ -884,7 +883,6 @@ namespace bit_stream.put(i2); bit_stream.put(d); bit_stream.put(s2); - bit_stream.put(ld); bit_stream.put(c2); bit_stream.restart(); @@ -897,7 +895,6 @@ namespace int32_t ri2; float rf; double rd; - long double rld; // Read them all back. CHECK(bit_stream.get(rc1)); @@ -921,9 +918,6 @@ namespace CHECK(bit_stream.get(rs2)); CHECK_EQUAL(s2, rs2); - CHECK(bit_stream.get(rld)); - CHECK_CLOSE(ld, rld, 0.1); - CHECK(bit_stream.get(rc2)); CHECK_EQUAL(int(c2), int(rc2)); } @@ -939,7 +933,6 @@ namespace int32_t i2 = -10836646; // 25 bits float f = 3.1415927f; double d = 3.1415927; - long double ld = 3.1414927L; int64_t ll = 140737488355327LL; std::array storage; @@ -975,38 +968,13 @@ namespace CHECK_EQUAL(22U, bit_stream.size()); CHECK_EQUAL(174U, bit_stream.bits()); - if (sizeof(long double) == 8) - { - bit_stream.put(ld); - CHECK_EQUAL(30U, bit_stream.size()); - CHECK_EQUAL(238U, bit_stream.bits()); + bit_stream.put(c2, 7); + CHECK_EQUAL(23U, bit_stream.size()); + CHECK_EQUAL(181U, bit_stream.bits()); - bit_stream.put(c2, 7); - CHECK_EQUAL(31U, bit_stream.size()); - CHECK_EQUAL(245U, bit_stream.bits()); - - bit_stream.put(ll, 47); - CHECK_EQUAL(37U, bit_stream.size()); - CHECK_EQUAL(292U, bit_stream.bits()); - } - else if (sizeof(long double) == 12) - { - bit_stream.put(ld); - CHECK_EQUAL(34U, bit_stream.size()); - CHECK_EQUAL(270U, bit_stream.bits()); - - bit_stream.put(c2, 7); - CHECK_EQUAL(35U, bit_stream.size()); - CHECK_EQUAL(277U, bit_stream.bits()); - - bit_stream.put(ll, 47); - CHECK_EQUAL(41U, bit_stream.size()); - CHECK_EQUAL(324U, bit_stream.bits()); - } - else - { - assert(false); - } + bit_stream.put(ll, 47); + CHECK_EQUAL(29U, bit_stream.size()); + CHECK_EQUAL(228U, bit_stream.bits()); bit_stream.restart(); @@ -1018,7 +986,6 @@ namespace int32_t ri2; float rf; double rd; - long double rld; int64_t rll; // Read them all back. @@ -1043,9 +1010,6 @@ namespace CHECK(bit_stream.get(rs2, 11)); CHECK_EQUAL(s2, rs2); - CHECK(bit_stream.get(rld)); - CHECK_CLOSE(ld, rld, 0.1); - CHECK(bit_stream.get(rc2, 7)); CHECK_EQUAL(int(c2), int(rc2)); diff --git a/test/test_delegate.cpp b/test/test_delegate.cpp index 55c6c35b..e76a3030 100644 --- a/test/test_delegate.cpp +++ b/test/test_delegate.cpp @@ -401,6 +401,7 @@ namespace CHECK(parameter_correct); } +#if !(defined(ETL_COMPILER_GCC) && (__GNUC__ <= 5)) //************************************************************************* TEST_FIXTURE(SetupFixture, test_member_void_compile_time) { @@ -470,6 +471,7 @@ namespace CHECK(function_called); CHECK(parameter_correct); } +#endif //************************************************************************* TEST_FIXTURE(SetupFixture, test_copy_construct)