Releases: TheMatjaz/atto
Releases · TheMatjaz/atto
v1.4.1
Fixes for very strict compiler warning flags.
Fixed
atto_zeros()andatto_nzeros()fixes:- cast the buffer to verify to
const unsigned charinstead of
unsigned charto avoid dropping anyconstqualifier of the buffer - use
(unsigned) charinstead ofuint8_tto avoid needingstdint.h - avoid using variable names starting with double underscores as those are
reserved handles and the compiler might complain
- cast the buffer to verify to
- Add missing
#include "atto.h"inatto.c. While typically works without
it, some compilers are complaining
Fixed/improved project internals (not related to Atto itself)
- Replace forced CMake compiler warning flags with
CMakePresets.json
to make them recommended but optional - Introduce
.gitattributes, mostly to force native line endings in Git
working directory - Introduce
.editorconfig, mostly to force length limits for lines of
Markdown - Introduce
.clang-format - Autoformat everything, including Readme, Changelog, CMakeLists, and C code (
according to newly added.clang-format)
[1.4.0] - 2021-05-21
Counters of assertion passes and failures, simple status report printing,
check for non-all-zero arrays, fixes to avoid compilation warnings.
Added
- Counters
atto_counter_assert_passesandatto_counter_assert_failures
counting the amount of assertionsatto_assert()or other aliases for it
that failed or passed, to be able to see the progress through the test
suite. atto_report()to provide a simple one-line indication of what is the
status of the 2 counters above at any point in the test suite,
including at the very end.atto_nzeros()which is the opposite ofatto_zeros(), checking that
there is at least one non-zero value in the array of bytes.
Useful to check whether a memory location has been initialised to non-zero
values, especially for random strings or data from an outside
source we don't know the exact format of.- GitHub workflow scripts to build and self-test on different operating
systems. Fancy badges in the readme included.
Fixed
- CMake configuration now uses a more portable set of compiler flags,
taken from LibAscon. - Some macro arguments did not have round brackets around them.
- Self-test changed to avoid compilation warnings due to improper use of types
(integers for float/double functions and signed/unsigned warnings). - Cast the length values passed to
atto_zeros()tosize_tto avoid
warnings about signed/unsigned integer comparison. - Remove
.ideafolder from Git repo from now on. - Fixed some typos/missing words in the BSD 3-Clause license text file.
- Renamed Doxygen build target to avoid name clashes.
- Fix typo in Doxygen config, now it should properly exclude the test
and source file. - Fixed self-test skipping some of the checks.
[1.3.1] - 2020-12-27
No changes in the code, only documentation.
Fixed
- Missing home page of the Doxygen documentation (being the content of the
Readme) - Missing title of the v1.3.0 release.
[1.3.0] - 2020-12-27
Clickable links to failed assertions!
Added
atto_true()which simply maps toatto_assert()to have an opposite of
atto_false()with consistent naming.
Changed
- The printed text in case of a failed testcase now combines the filename
and the line together in the format likefilename.c:42with42being the
line. This allows some IDEs to recognise it as a link to a specific code line
and make them clickable for much easier testing and debugging.
Fixed
-
atto_zeros(x, len)supports any kind of address asx, even nonuint8_t*
thus allowing to scan arrays of other integers or floats or strings for
zeros without explicitly casting them. They are converted touint8_t*
internally. -
Replace Doxyfile with CMake building it instead. Add stricter options.
[1.2.0] - 2020-02-05
Two more macros, some project structure changes (new atto.c file, new src/
folder).
Added
atto_memneq(a, b, len), the negation ofatto_memeq(), checks that two
memory segments are not equal.atto_zeros(x, len)checks that a memory segment is filled with zeros.
Fixed
- Move
atto_at_least_one_failvariable into new separateatto.cfile.
Required as importingatto.hfile in many locations leads to many static
copies of the same variable to be set, which means that different files see
a different variable. - Move selftest into subfolder
tst/, movedatto.handatto.cintosrc/
Required as when incorporating this whole project (or repo)
into another C project, the IDE may interpret selftest.c as part
of the main project, while it's not relevant.
With this trick, one can set the atto/src folder as the only relevant
one. - Variety of minor fixes in the readme.
[1.1.0] - 2019-10-06
More specialized macros for operators and floats, simpler examples, self test.
Added
atto_false(x), the negation ofatto_assert(), to avoid forgetting the
!when calling something likeatto_assert(!x)- Equality, inequality and other comparision operators, in particular to avoid
mistyping the operator, especially the==into an assignment=
when calling something likeatto_assert(a == b)- Equality
atto_eq(a, b) - Inequality
atto_neq(a, b) - Less-Than
atto_lt(a, b) - Less-Equal
atto_le(a, b) - Greater-Than
atto_gt(a, b) - Greater-Equal
atto_ge(a, b)
- Equality
- Floating point equality with a custom absolute tolerance
- For floats
atto_fdelta(a, b, abstol) - For doubles
atto_ddelta(a, b, abstol)
- For floats
- Non-finite floating point values checks
- Value is NaN
atto_nan(x) - Value is +/- Infinity
atto_inf(x) - Value is +Infinity
atto_plusinf(x) - Value is -Infinity
atto_minusinf(x) - Value is NaN or +/- Infinity
atto_notfinite(x) - Value is anything but Nan or +/- Infinity
atto_finite(x)
- Value is NaN
- Proper self-test
selftest.cof the whole Atto framework. - More compiler flags to check for errors during compilation of the self-test.
Removed
example.ctest file. Instead a simpler example is provided within the
Readme.
[1.0.0] - 2019-05-08
Initial version.
Added
- Various macros to test an assertion:
atto_assertatto_fapproxatto_dapproxatto_flagatto_noflagatto_streqatto_memeqatto_fail