Commit Graph
55 Commits
Author SHA1 Message Date
Patrick Pelissier d548117538 Make M*LIB stricter for INIT_MOVE operator:
* either the default INIT_MOVE operator works ('=')
* either an INIT_MOVE method is defined
* or it is disabled.
As a consequence, fix usage of testobj_t and mpz_t in the repository

The emulation layer of INIT_MOVE using INIT_SET+CLEAR is removed:
it wasn't working correctly with the local memory context
(INIT_MOVE doesn't need any local memory context to work,
 whereas INIT_SET/CLEAR does)
Remove macro M_DO_INIT_MOVE as it is now useless and uses M_CALL_INIT_MOVE.

The INIT_MOVE default method no longer sets the old 'src' to '0':
it was useless (it doesn't catch any error) and complicates compiler parsing.

Fix POD & A1 & CSTR & classic oplists definition (missing INIT_MOVE operators).
2025-05-07 21:02:24 +02:00
Patrick Pelissier 37b2f4d2ac Update test suite to properly allocation & deallocation 2025-05-07 21:02:23 +02:00
Patrick Pelissier 6d621703eb Copyright go to 2025 year 2025-03-01 11:03:38 +01:00
Patrick Pelissier 52b58c5a51 Happy new year 2024 2024-01-19 21:37:47 +01:00
Patrick Pelissier 589abda0c2 Fix bug in list insertion:
The output iterator has its previous field incorrect.
2023-08-13 23:27:12 +02:00
Patrick Pelissier f858aa2cb5 Improve coverage of the test suite. 2023-04-05 23:07:52 +02:00
Patrick Pelissier e4afb024b9 Improve coverage of test suite 2023-04-05 00:38:44 +02:00
Patrick Pelissier d02de75487 Add control that all initialized testobj are properly cleared at the end of the test suite 2023-03-12 20:29:58 +01:00
Patrick Pelissier a2ae209992 Happy new year 2023-01-02 12:57:41 +01:00
Patrick Pelissier c0abcc6d60 Add tests for new emplace functions 2022-04-22 22:51:36 +02:00
Patrick Pelissier e1abf0528c Rename M_DEFAULT_OPLIST in M_BASIC_OPLIST (cleaner name) 2022-04-08 22:54:29 +02:00
Patrick Pelissier 19b01b404d Migrate to 2022 2022-03-12 20:25:45 +01:00
Patrick Pelissier f6e3cbbb65 Rename LIST _clean in _reset to avoid confusing _clean & _clear functions. See #97 2021-10-28 17:38:18 +02:00
Patrick Pelissier 2178dcfcab Add LIST_INIT_VALUE & LIST_DUAL_PUSH_INIT_VALUE. 2021-08-15 21:55:09 +02:00
Patrick Pelissier 3ac08b0395 Add test with a lot of different kind of M_LET with list of strings. 2021-07-01 22:12:15 +02:00
Patrick Pelissier 36003b6bb3 * Add support for extented variable for M_[F]PRINT
* Update documentation
* Add test.
2021-07-01 00:13:31 +02:00
Patrick Pelissier 25fe26deaa Happy new year 2021-01-13 20:18:01 +01:00
Patrick Pelissier e04b120d41 Add new macros _DEF_AS so that
user can define its own name for the generated types.
2020-10-03 14:07:14 +02:00
Patrick Pelissier d27c448a94 Fix some warnings with MSVS
for the test suite.
2020-06-21 23:52:12 +02:00
Patrick Pelissier 607221f480 Fix expected result due to change in list + INIT_WITH 2020-06-13 18:19:29 +02:00
Patrick Pelissier 4f7b0b9455 Happy new year 2020 2020-01-04 15:41:06 +01:00
Patrick Pelissier 8b3a4a802c Happy new year! 2019-01-02 18:12:07 +01:00
Patrick Pelissier 2174c28aa2 Make INIT operator optionnal for ARRAY & LIST. 2018-09-08 08:21:13 +02:00
Patrick Pelissier 822c27399c Add M_INIT_VAI to initialize a container with a VA.
(pretty much like it was done for ALGO).
Use if for array & list so that you can init them in M_LET
by giving it a VA.
2018-09-01 21:12:02 +02:00
Patrick Pelissier 8c0b6f1e9d Fix spellings. 2018-08-25 21:35:37 +02:00
Patrick Pelissier e1147fb33d Add support for IN_STR for default C types. 2018-08-23 19:58:02 +02:00
Patrick Pelissier dbb34b75fd Add method for the operator OUT_STR for the default type. 2018-08-21 19:26:18 +02:00
Patrick Pelissier 166d408f5e Add support for out_str for the default C types if C11 is enabled. 2018-08-01 20:12:24 +02:00
Patrick Pelissier a3fad5966a Update test to reflect the new specifications. 2018-05-28 23:46:10 +02:00
Patrick Pelissier e5f5563249 Add method _splice_at for dual_push_list 2018-05-28 21:58:45 +02:00
Patrick Pelissier 2a6893efb4 Add method _splice_at for singly list. 2018-05-28 21:22:14 +02:00
Patrick Pelissier 86083e3a92 Add methods push_move & pop_move.
Rewrite _pop_back to be a little bit faster for complex structure as it used
DO_MOVE instead of plain _set.
2018-05-19 11:21:18 +02:00
Patrick Pelissier e9f603fa30 Rename internal calls to my_mpz* to testobj* 2018-05-08 10:40:29 +02:00
Patrick Pelissier 1a064e033b Rename mympz.h --> test-obj.h
as it is used only for testing purpose.
2018-05-08 10:29:51 +02:00
Patrick Pelissier 37191a53c3 Fix unclear variable. 2018-05-04 00:14:52 +02:00
Patrick Pelissier 4efa8c1ef9 Add function _parse_str for list. 2018-05-03 17:14:10 +02:00
Patrick Pelissier 20d549b5e1 Rename MYMPZ_OPLIST into MY_MPZ_OPLIST 2018-04-14 08:11:14 +02:00
Patrick Pelissier bc83fe43e5 Remove dependency on GMP, so that it is easier to run the bench suite. 2018-03-29 20:01:45 +02:00
Patrick Pelissier 3d57d35536 Update test 2018-02-25 11:52:14 +01:00
Patrick Pelissier bacf2b9eec Add more test for dual push list 2018-02-25 11:43:31 +01:00
Patrick Pelissier a497c07b0b Update test 2018-02-24 21:41:30 +01:00
Patrick Pelissier 97e3cc35c2 Add more tests. 2018-02-24 20:26:32 +01:00
Patrick Pelissier 7637c2fb58 Update test 2018-02-24 15:16:11 +01:00
Patrick Pelissier 5b40b43435 Add some tests. 2018-02-24 15:13:34 +01:00
Patrick Pelissier 6ec277ec99 Add dual push singly linked list 2018-02-24 15:07:58 +01:00
Patrick Pelissier 1befa63c9b Remove duplicate code. 2018-02-24 15:04:44 +01:00
Patrick Pelissier 210e05f7fc Update copyright to 2018 2018-01-29 20:28:30 +01:00
Patrick Pelissier a07d71274a Fix issue with massive parallele check 2017-10-25 21:46:54 +02:00
Patrick Pelissier 4cb92a92b8 Remove list_ prefix from all lists.
See commit on shared-pointers.
Rename the iteration type to be prefix by name list_it_name_t ==> name_it_t
2017-07-27 21:40:35 +02:00
Patrick Pelissier fc323a5feb Improve coverage. 2017-07-10 17:35:00 +02:00