1474 Commits

Author SHA1 Message Date
Eric Vantillard
ccdd5c2033 Update test sources in meson build (#604)
- Update list of tests according to CMakeLists.txt content.
- Update compiler args :
	- Add same arguments as in CMakeLists.txt.
	- Remove non-vitual-dtor warnings (code need to be fixed before enabling this warning).
	- Enable sanatizer.
- Add unittest-cpp subproject as a wrap dependency.
- Add `meson test`target to start the `etl_unit_tests` program.
2022-10-19 12:22:52 +01:00
John Wellbelove
0097f18746 VS2022 sln 2022-10-19 12:22:52 +01:00
John Wellbelove
b76e9ba553 Remove redundant functions 2022-10-19 12:22:52 +01:00
Joris Putcuyps
b88c088bd6 Provide cmake library for UnitTest++. (#616)
* Provide cmake library for UnitTest++.
Prefer cmake target_* commands.

* Replace wrong cmake link options with compile

* We need the sanitize flags also in linker
2022-10-19 12:22:52 +01:00
Chiraffollo
e1099814b9 fix bug in find_next of (new) bitset class (#618) 2022-10-19 12:22:51 +01:00
John Wellbelove
a5c57521cb Fix small issues
Move tests to test_iterator
2022-10-19 12:22:51 +01:00
Eric Vantillard
445f950a82 Feature/add back insert iterator (#603)
* Add back_inserter implementation

- Mainly a copy of the STL implementation found in LLVM.
- Add test_back_insert_iterator unit test.

* Add documentation and use ETL_OR_STD macro

* Add MIT License in header

* Move back_insert_iterator into iterator.h

* Remove unused code

* Strictly follow the C++ STL naming

https://en.cppreference.com/w/cpp/iterator/back_insert_iterator
Strictly following the C++ STL would have container_ be container.

* Make the check for C++11 clearer

* Run the unit test only for C++11

* Add front_insert_iterator

- Make back_insert_iterator available to C++03
- Add ETL_CONSTEXPR17,ETL_NODISCARD and ETL_USING_CPP11
- Replace std:move usage by etl::move
- Update doc

* Use explicit namespace for adressof() and move().
2022-10-19 12:22:51 +01:00
Jesse Li
1b3d226547 Fix non-usage of key equal function (#606)
Co-authored-by: Jesse <jli@planarmotor.com>
2022-10-19 12:22:51 +01:00
Jesse Li
2beceddfd6 [bug] Special case check for hashing -0.0 (#605)
* Special case check for hashing 0 floating point numbers

* Update test_hash.cpp

Co-authored-by: Jesse <jli@planarmotor.com>
Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
2022-10-19 12:22:51 +01:00
John Wellbelove
7a1f9f961e Storage type to unsigned char 2022-10-19 12:20:43 +01:00
John Wellbelove
edb6c87a2d Added select1st and select2nd 2022-10-19 12:20:42 +01:00
Eric Vantillard
b5182dd83e Feature/add pair functors (#610)
* Move __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS before `#include <stdint.h>`. (#601)

Macros must be defined before first include of stdint.h. Else they have no effect.

* Replace ETL_COMPILER_ICCAVR by ETL_COMPILER_IAR. (#602)

The current definition mechanism for ETL_COMPILER_ICCAVR does not work. Both IAR compilers, for ARM and AVR define `__IAR_SYSTEMS_ICC__`. Thus `ETL_COMPILER_TYPE_DETECTED` will be defined in line before ETL_COMPILER_ICCAVR is defined. This switch will never be entered.

Currently I see no reason for differentiating both compilers (`__ICCARM__` and `__ICCAVR__`). The condition for the IAR compiler platform (`__IAR_SYSTEMS_ICC__`) is sufficient (combined with <C++11 detection).

At the moment ETL_COMPILER_ICCAVR is used as a switch condition for using `#pragma push_macro`. But actually IAR ARM and IAR AVR have no such macro defined. ETL_COMPILER_IAR is defined for both compilers. Thus the switch condition is replaced with ETL_COMPILER_IAR.

* Fix 'maybe-uninitialized' g++ error on macos (#600)

* Add documentation to the pair class

* Add test directory to the EXAMPLE_PATH

* Update .gitignore

- Remove duplicate entries
- Add doxygen output directories

* Add Select1st and Select2nd functors

* Merge select1st and select2nd into utility.h

Co-authored-by: David Hebbeker <dhebbeker@users.noreply.github.com>
2022-10-19 12:20:42 +01:00
Eric Vantillard
6ac2087368 Fix 'maybe-uninitialized' g++ error on macos (#600) 2022-10-19 12:20:42 +01:00
John Wellbelove
d63be881a4 Fix warnings 2022-09-12 12:21:37 +01:00
John Wellbelove
c39ed5af80 Attempt to fix clang CI error 2022-09-12 00:00:06 +01:00
John Wellbelove
cc17c93ef2 Attempt to fix clang CI error 2022-09-11 23:48:02 +01:00
John Wellbelove
31edd14a8c Attempt to fix clang CI error 2022-09-11 23:31:17 +01:00
John Wellbelove
b4e4bcc6b3 Attempt to fix clang CI error 2022-09-11 22:50:01 +01:00
John Wellbelove
d7609360e8 Attempt to fix clang CI error 2022-09-11 21:11:27 +01:00
John Wellbelove
89d17dd773 Attempt to fix clang CI error 2022-09-11 20:50:56 +01:00
John Wellbelove
d62f2bc666 Attempt to fix clang CI error 2022-09-11 20:32:09 +01:00
John Wellbelove
8d99194528 Attempt to fix clang CI error 2022-09-11 20:10:26 +01:00
John Wellbelove
e99a1a5845 Attempt to fix clang CI error 2022-09-11 19:50:09 +01:00
John Wellbelove
11c520fbaf Attempt to fix clang CI error 2022-09-11 19:20:11 +01:00
John Wellbelove
93aa08682c Attempt to fix clang CI error 2022-09-11 18:34:06 +01:00
John Wellbelove
f8d9eb0f46 Attempt to fix clang CI error 2022-09-11 18:02:27 +01:00
John Wellbelove
471c86828b Attempt to fix clang CI error 2022-09-11 17:09:29 +01:00
John Wellbelove
4645b7bf23 Attempt to fix clang CI error 2022-09-11 16:28:12 +01:00
John Wellbelove
92327d55f8 Reduce number of threads used to compilation 2022-09-11 00:59:04 +01:00
John Wellbelove
7b733f73ad Minor updates to bitset
Added bitset_ext tests to cmake
2022-09-11 00:57:00 +01:00
John Wellbelove
e78e7b474a Added etl:lsb_mask, etl::make_lsb_mask, etl::msb_mask and etl::make_msb_mask 2022-09-11 00:55:55 +01:00
John Wellbelove
2d0d744c74 Updated etl::bitset and added etl::bitset_ext 2022-09-08 20:11:20 +01:00
John Wellbelove
e8cc472ac9 Finished etl::circular_iterator an circular extensions to etl::span 2022-09-06 19:43:01 +01:00
John Wellbelove
dc0ab72e09 circular_span first draft 2022-09-06 10:59:49 +01:00
John Wellbelove
25adb3c68c Almost finalised circular_iterator and tests 2022-09-04 23:44:51 +01:00
John Wellbelove
2c0f56841e Almost finalised circular_iterator and tests 2022-09-04 21:05:22 +01:00
John Wellbelove
13a1ce6f8e Merge branch 'feature/circular_iterator' of https://github.com/ETLCPP/etl into feature/circular_iterator 2022-09-03 13:24:46 +01:00
John Wellbelove
15fd907549 Merge branch 'hotfix/#582-unordered_set-equality-comparison-fails-when-hash-collisions-occur' into development 2022-09-03 11:57:11 +01:00
John Wellbelove
eceaa23f47 #584 unordered_set::const_iterator has incorrect value_type 2022-09-03 11:56:24 +01:00
John Wellbelove
7c5a6e49a1 Fixed unordered container equality tests to match STL 2022-09-02 20:40:17 +01:00
John Wellbelove
60204d95b6 Initial test for unordered_set 2022-09-02 15:59:21 +01:00
John Wellbelove
201c1fb918 Merge branch 'hotfix/#583-permit-non-default-constructable-hashes-and-key-equals-in-unordered_map' into development 2022-09-02 13:32:23 +01:00
John Wellbelove
4f5847e189 Updates for unordered maps and sets for an API that better matches the STL 2022-09-02 13:32:00 +01:00
Jesse Li
aab900f002
Permit non-default-constructable hashes and key-equals (#583)
Co-authored-by: Jesse <jli@planarmotor.com>
2022-09-01 19:41:09 +01:00
John Wellbelove
b00929ef09 Merge branch 'feature/#581-hash-functions-for-enum' into development 2022-09-01 19:26:35 +01:00
Jesse Li
a38a8fc33c
#227 Hash function for enums (#581)
* #227 Hash function for enums

* Move enum hash definition to bottom, so gcc doesn't complain about it

* Explicitly specify etl hash

Co-authored-by: Jesse <jli@planarmotor.com>
2022-09-01 19:10:35 +01:00
John Wellbelove
f0862971c1 Merge branch 'hotfix/#585-etl-result-void-being-unusable-due-to-deleted-default-constructor' into development 2022-09-01 18:56:46 +01:00
Eyal Abramovitch
927491c763
Fix etl::result<void> being unusable due to deleted default constructor (#585) 2022-08-31 12:43:56 +01:00
John Wellbelove
59ffb54fa4 Changed explicit message constructor for unsupported message types. 2022-08-31 11:54:08 +01:00
John Wellbelove
64fa058f6b Work in progress 2022-08-26 09:49:13 +01:00