36 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
John Wellbelove
aeb8e4f734 Formatted source files 2026-04-02 14:11:45 +01:00
John Wellbelove
089f65cce1
Added get_endianness() to etl::byte_stream_reader (#1315)
Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com>
2026-02-27 11:18:29 +00:00
John Wellbelove
d884719098 Fixed all 'extra semicolon' warnings 2025-12-16 09:15:26 +00:00
John Wellbelove
101cfd598f Disabled initialisation of a delegate from a temporary lambda 2025-01-27 09:13:18 +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
John Wellbelove
01d96609cf #753 [porting] IAR's overload resolution struggles with etl::span::span(etl::array&)
#754 ambiguous etl::bit_stream_reader::bit_stream_reader() for some etl::span
2023-09-02 14:50:24 +01:00
John Wellbelove
b609548f38 Added ETL_OR_STD17 macro for the namespace for size() 2023-04-23 18:58:30 +01:00
John Wellbelove
8eabe5fb26 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-03-25 12:16:59 +00:00
John Wellbelove
4844b54c91 #668 byte_stream changes that add error exceptions have changed previous behaviour 2023-02-22 09:36:53 +00:00
John Wellbelove
3beff56587 Fixed byte_stream_reader skip()
Change '<' to '<='
2023-01-19 10:31:39 +00:00
John Wellbelove
3c26ffea4e dded etl::byte_stream_overflow assert to byte_stream_reader 'skip'. 2022-06-23 19:49:20 +01:00
John Wellbelove
fefe6d3975 Added endianness to bit_stream_writer 2022-06-18 20:57:26 +01:00
John Wellbelove
6a8cdf6892 Added error exceptions to byte_stream_writer 2022-06-15 11:43:54 +01:00
John Wellbelove
3a2f71456a Added optional byte_stream callback 2022-06-15 11:43:13 +01:00
John Wellbelove
c0fb8761df Added write_byte_stream_iterative_output 2022-06-15 11:43:13 +01:00
John Wellbelove
baa47d1c33 Updated copyright notice 2022-06-10 21:45:37 +01:00
John Wellbelove
e864fe62d5 Added optional byte_stream callback 2022-06-10 21:45:33 +01:00
John Wellbelove
4306350da0 Added write_byte_stream_iterative_output 2022-06-10 21:45:33 +01:00
John Wellbelove
7bb39b56bf Added skip() to byte_stream_writer. 2022-05-17 17:04:47 +01:00
John Wellbelove
7b3bb5fa6d Fixed incorrect returned span length for byte stream read 2022-05-15 18:01:44 +01:00
John Wellbelove
07bda38893 Removed unused code 2022-01-12 18:32:12 +00:00
John Wellbelove
998322d02c Add available_bytes to byte_stream_reader & byte_stream_writer 2021-10-21 09:26:20 +01:00
John Wellbelove
0d612f1317 Added missing read() member functions in byte_stream_reader
Updated version numbers
2021-10-07 15:11:43 +01:00
John Wellbelove
2d64b77e4a Modified read_unchecked & write_unchecked
Added start/length read/write implementations
2021-10-05 14:24:46 +01:00
John Wellbelove
4b67f54f1f Added read_unchecked & write_unchecked 2021-10-04 16:59:42 +01:00
John Wellbelove
ec64141598 #438 void* reader writer API 2021-10-03 15:38:50 +01:00
John Wellbelove
05f17e1d74 #428 byte_stream_reader can't be used to read a span of const data 2021-10-01 18:41:35 +01:00
John Wellbelove
579527a932 Fixes to byte_stream_reader for const data 2021-10-01 18:41:35 +01:00
John Wellbelove
ee46d76548 Additional member functions 2021-09-02 16:07:09 +01:00
John Wellbelove
6fb9357b7c Added cbegin() & cend() 2021-08-24 12:12:19 +01:00
John Wellbelove
c79802122c Updated tests 2021-08-23 14:24:02 +01:00
John Wellbelove
5cbe4fb3e1 Read write span ranges 2021-08-22 12:58:32 +01:00
John Wellbelove
133ff78330 Added templated etl::write & etl::read functions for byte stream 2021-08-21 09:54:31 +01:00
John Wellbelove
42d451dc79 Expanded tests and updated make lists 2021-08-20 19:39:49 +01:00
John Wellbelove
ed74f8bc54 Initial byte_stream code 2021-08-20 10:22:44 +01:00