55 Commits

Author SHA1 Message Date
Roland Reichwein
866c8a315e
Extensions for testing (#1380)
* Extensions for testing

Generalize run-tests.sh

Test all C++ versions at once

Fix combination of big endian and -Wsign-conversion

Failed on s390x (as reference for big endian)

Add github workflow for s390x

Add armhf container files

Devcontainers for i386 and riscv

Add github workflows for armhf, i386 and riscv64

Add run-tests.sh for foreign architectures

Document testing in doc/testing.md

Adjustments from clang-format run

Fix .devcontainer/s390x/Dockerfile for linebreak syntax

Fix exit code of run-test.sh

Previously, "exit $?" was used, actually the return value of
FailedCompilation and FailedTest which are always 0.

Now just using 1.

In run-tests.sh at ctest, use -V for printing number of tests unconditionally

While ctest suppresses individual test list by default, it didn't even
print the number of tests anymore, as run_tests.sh does because
it suppresses it output completely.

Now, by default print number of tests, and in verbose mode, print test list
in addition.

* Support powerpc as foreign architecture

* Add SFINAE constraints to etl::begin/end and reverse iterator free functions

The unconstrained etl::begin(), etl::end(), etl::cbegin(), etl::cend(),
etl::rbegin(), etl::rend(), etl::crbegin(), and etl::crend() templates
in the no-STL code path were matching iterator types during ADL, causing
a hard error with GCC 15's std::ranges::begin. When std::ranges performed
ADL on an etl::*::iterator, it found etl::begin() as a candidate; since
the iterator type has a nested iterator typedef, the return type TContainer::iterator
was valid, but calling .begin() on the iterator failed.

Fix: add etl::void_t<decltype(...)> SFINAE guards to each template,
ensuring they only participate in overload resolution when TContainer
actually has the corresponding member function (.begin(), .end(), etc.).

* - Fix red unit tests on 32 bits big-endian platform.

* Document powerpc architecture for testing

* Use Dockerfiles in cross testing github workflows

Synchronizes environment setup for github workflows to what is
defined in the development Dockerfiles. So they don't need to
be maintained separately.

---------

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: Sergei Shirokov <sergej.shirokov@gmail.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-04-15 10:47:52 +02:00
Roland Reichwein
29d0cfec7c
Suppress false positive compiler warnings when compiling with -O3 (#1389)
* Print test names at test time (#1343)

* Suppress false positive compiler warnings when compiling with -O3

The CI checks currently only check everything with -O0. Wenn activating
higher optimization levels, more warnings kick in. Leading to errors,
depending on the configuration.

---------

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2026-04-14 12:38:59 +02:00
John Wellbelove
aeb8e4f734 Formatted source files 2026-04-02 14:11:45 +01:00
John Wellbelove
7ee7f10f58
Hotfix/etl multiset iterator invalidation during erase leads to incorrect sorted order in depth first traversal (#1317)
* Fixed issue for both multiset and multimap

* Added std::is_sorted checks to all map/set tests

* Updated with coderabbit suggestions

---------

Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-03-01 12:27:39 +00:00
John Wellbelove
d884719098 Fixed all 'extra semicolon' warnings 2025-12-16 09:15:26 +00:00
John Wellbelove
9b3d8dc96e Fixed lower and upper bound tests for std::less comparator 2025-07-08 20:47:05 +01:00
John Wellbelove
96846f9b57 Removed 'possible nullptr' warning. 2024-04-01 16:57:46 +01:00
John Wellbelove
77513730e0 Fixed shadow warnings in all files
#823 Multiple variable shadowing warnings in private/bitset_new.h
2024-01-25 14:22:26 +00:00
John Wellbelove
4606e33a6d Merge branch 'pull-request/#782-Set-is-full-error-when-adding-existing-item' into development 2023-11-24 11:26:55 +00:00
İsmail Tüzün
c6fecd9d7c
Set is full error when adding existing item (#782)
* Fixed set_full error when inserting existing item.

* Added test inserting existing value to full set

* Added test inserting existing value to full flat_set and reference_flat_set

* Fixed unordered_set_full error when inserting existing item.
2023-11-24 11:24:52 +00:00
John Wellbelove
63d1a64e6c #787 etl::expected doesn't compile with ETL_LOG_ERRORS
Updated CI scripts
#786 u8string
#783 Cannot insert existing value to full set
#781 etl::multi_span::iterator::operator *() fails if first span is empty
#780 endian enum_type produces useless-cast warnings
#779 hash.h: warnings produced with -Wfloat-equal
2023-11-24 09:59:35 +00:00
Soma Veszelovszki
93091cff0f Fixed: move assignment not working for non-empty containers (#759) 2023-09-20 23:06:32 +01:00
John Wellbelove
363a3e2dab Fix test array sizes
C++14 compiler compatibility

Updated test run scripts

Changed some ETL_ASSERT macros to ETL_ASSERT_OR_RETURN

Changed unit test macros for C++20 compaibility

Updated test run scripts

Updated CMake files to allow C++ standard selection

Replaced ETL_ASSERT_AND_RETURN with ETL_ASSERT_OR_RETURN

Updated C++14 & C++20 unit test compatibility

Changed native char8_t check

Added optional optimisation argument to bash script
2023-04-02 11:06:43 +01:00
John Wellbelove
cd18cc6af0 Eradicated all GCC and clang warnings 2022-07-27 10:42:03 +01:00
John Wellbelove
baa47d1c33 Updated copyright notice 2022-06-10 21:45:37 +01:00
John Wellbelove
9224df106e Fixed data alignment issues raised by sanitizer 2022-05-16 20:58:07 +01:00
John Wellbelove
740e490aed Tested ETL traits code. 2022-03-11 20:28:26 +00:00
John Wellbelove
87fe3eec2d Replaced post increment with pre increment 2022-02-03 17:16:26 +00:00
John Wellbelove
c6ff32e901 contains() & transparent comparator 2021-12-04 10:24:04 +00:00
John Wellbelove
4d48082f4f contains() & transparent comparator for map, multimap, set and multiset 2021-12-01 18:42:22 +00:00
John Wellbelove
33490aeaef Fixes for < GCC 8 2021-11-21 18:09:01 +00:00
John Wellbelove
343dabe7e2 Fixes for < GCC 8 2021-11-21 17:29:56 +00:00
John Wellbelove
52586af2de Latest implementations 2021-11-18 12:26:15 +00:00
John Wellbelove
8fc7e0208a Added 'make' functions to construct containers
Added tests for 'make' and 'template deduction'
2021-11-18 12:26:13 +00:00
Steffen Zimmermann
d05bf1b4fd
let map/multimap/set/multiset return iterator on erase (#463)
Beginning with C++11, erase(iterator) and erase(const_iterator) returns
an iterator following the removed element.
2021-11-15 10:26:23 +00:00
CanastraRF
7c0f169b66
literal with suffix (#416) 2021-08-23 11:01:18 +01:00
Bo Rydberg
369645179f
Remove executable permission on C++ source files (#341) 2021-03-09 10:25:15 +00:00
John Wellbelove
dbfa71944f Abstracted unit test framework header 2021-03-05 13:52:34 +00:00
John Wellbelove
9eaa3e1178 Fix make_string for zero length literals
Remove redundant test support code
2020-11-18 18:29:20 +00:00
John Wellbelove
18d8236f91 Conditionally disable template deduction guide tests 2020-09-29 11:23:10 +01:00
John Wellbelove
509089c0e2 Added template deduction guides 2020-09-28 13:14:12 +01:00
finger42
8f1361649e
Build and run tests with Clang-9 on Linux (#252)
* Try to build on Ubuntu-18.04 with Clang-9

* Build with pushes on clang-9 branch too

* Using CC and CXX to set clang-9

* Adding atomic lib for test build on Linux with Clang

* Partial conversion CHECK_EQUAL to CHECK for clang-9

* Replaced CHECK_EQUAL with CHECK

* Replaced CHECK_EQUAL with CHECK

* Replaced CHECK_EQUAL with CHECK

* Replaced CHECK_EQUAL with CHECK

* Replaced CHECK_EQUAL with CHECK

* Replaced CHECK_EQUAL with CHECK

* Replaced CHECK_EQUAL with CHECK

Co-authored-by: finger42 <finger42>
2020-08-01 14:20:14 +01:00
John Wellbelove
f4d9476900 Simplified conditional macros 2020-05-09 19:40:44 +01:00
John Wellbelove
e323f2267f Changed http://www.etlcpp.com to https://www.etlcpp.com 2020-05-01 10:22:36 +01:00
John Wellbelove
a108addf84 Added move API to unordered map and set containers.
Added a 'move' member function that moves items into the containers.
2020-03-30 18:05:33 +01:00
John Wellbelove
9dd88e1885 Merge remote-tracking branch 'origin/development' 2020-02-11 13:27:43 +01:00
John Wellbelove
83347ccfdd Work in progress 2020-01-09 11:15:50 +00:00
John Wellbelove
94c5eed5a4 Work in progress 2020-01-04 11:49:22 +00:00
John Wellbelove
5803d928a1 Merge remote-tracking branch 'origin/feature/no_stl_unit_tests' into development
# Conflicts:
#	include/etl/stl/alternate/algorithm.h
#	include/etl/stl/alternate/iterator.h
#	include/etl/version.h
#	library.json
#	library.properties
#	support/Release notes.txt
#	test/test_no_stl_algorithm.cpp
#	test/test_no_stl_iterator.cpp
#	test/vs2017/etl.vcxproj
2019-12-01 18:21:10 +00:00
NeimadG
7cb1967a89 br test set lowerbound (#163)
* add test of etl::set:lower_bound

* fix etl::set::lower_bound

* fix map, extra test map/multiset/multimap
2019-11-05 08:46:40 +00:00
John Wellbelove
60f7061bef #93 map.h on release 11.15.0 does not compile with clang-6 2018-09-04 23:25:16 +01:00
John Wellbelove
bd008350a2 Merge remote-tracking branch 'origin/feature/changed_include_paths' into development
# Conflicts:
#	include/etl/version.h
2018-07-28 21:55:27 +01:00
John Wellbelove
ab65a5abaa Added std::initializer_list constructors when ETL_CPP11_SUPPORTED is defined as 1 2018-03-25 14:34:28 +01:00
John Wellbelove
7ce4fedf58 Added emplace member functions to flat_map, flat_multimap, flat_set and flat_multiset 2018-02-03 21:09:22 +00:00
John Wellbelove
eb222f54bb Containers are now deleteable through a pointer to their 'ixxxx' class. 2018-01-30 08:47:49 +00:00
John Wellbelove
97fbb678da Removed Git merge annotation 2017-10-02 20:40:42 +01:00
John Wellbelove
26b7326d72 Updated Code::Blocks project.
Changed test project include paths to use unittest++ as sub-module.
2017-05-08 20:48:22 +01:00
John Wellbelove
f1c5c20ba7 Changed folder structure to be compatible with Arduino library specifications 2016-02-28 14:04:22 +00:00
John Wellbelove
ceef10dc93 Disabled copy constructor.
Added interface assignment operator.
2016-01-14 18:31:43 +00:00
John Wellbelove
16a1978f43 Added link to www.etlcpp.com in licence header. 2015-12-16 11:09:56 +00:00