Skip to content

Commit

Permalink
Update docs and prepare for second pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed Mar 16, 2024
1 parent 5d5833b commit 010b589
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 5 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
- [libassert 2.0.0-beta](#libassert-200-beta)
- [libassert 2.0.0-alpha](#libassert-200-alpha)
- [libassert 1.2.2](#libassert-122)
- [libassert 1.2.1](#libassert-121)
- [libassert 1.2](#libassert-12)
- [libassert 1.1](#libassert-11)
- [libassert 1.0 🎉](#libassert-10-)

## libassert 2.0.0-beta

Changes:
- Catch2 and GoogleTest integrations
- Implemented alternative path modes
- {fmt} support with `LIBASSERT_USE_FMT`
- Reworked stringification again
- Overhauled C++ tokenizer to use a much better implementation
- Added `libassert::enable_virtual_terminal_processing_if_needed()` to the public interface
- Added `libassert::isatty` to the public interface as well as stdin/stdout/stderr constants
- Renamed `libassert::generate_stringification` to `libassert::stringify`
- Added setting for output separator with `libassert::set_separator`
- Updated parameter passing for `libassert::set_color_scheme`
- Updated `libassert::stacktrace` to take color scheme and skip parameters
- Added C++23 specialization for how static assertion information is stored which is hopefully faster for compile times
- Added `LIBASSERT_PREFIX_ASSERTIONS` option to only add assertion macros with a `LIBASSERT_` prefix
- Added normalization for msvc ``​`anonymous namespace'``
- Added `LIBASSERT_NO_STRINGIFY_SMART_POINTER_OBJECTS` option
- Improved how data is stored in `binary_diagnostics_descriptor`, `assert_static_parameters`, and `assertion_info`
- Simplified up failure handler signature
- Added limit to the number of items stringified for containers
- Resolved long-standing bug related to libc++'s std::regex implementation
- Added methods for getting parts of assertion info outputs for easier custom failure handler implementation
- Improved internal argument processing
- Cmake fixes and improvements

## libassert 2.0.0-alpha

This is the first pre-release for version 2. Version 2 is an overhaul of the library taking lessons learned.
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ float f = *ASSERT_VAL(get_param());
**Types of assertions:**
Conditional assertions:
- `DEBUG_ASSERT`: Checked in debug but but does nothing in release (analogous to the standard library's `assert`)
- `ASSERT`: Checked in both debug and release
- `ASSUME`: Checked in debug and serves as an optimization hint in release
Unconditional assertions, essentially shortcuts for `ASSERT(false, ...)`:
Unconditional assertions:
- `PANIC`: Triggers in both debug and release
- `UNREACHABLE`: Triggers in debug, marked as unreachable in release
Expand All @@ -102,6 +104,8 @@ You can enable the lowercase `debug_assert` and `assert` aliases with `-DLIBASSE
- Smart literal formatting
- Stringification of user-defined types
- Custom failure handlers
- Catch2/Gtest integrations
- {fmt} support
## CMake FetchContent Usage
Expand All @@ -110,7 +114,7 @@ include(FetchContent)
FetchContent_Declare(
libassert
GIT_REPOSITORY https://github.com/jeremy-rifkin/libassert.git
GIT_TAG v2.0.0-alpha # <HASH or TAG>
GIT_TAG v2.0.0-beta # <HASH or TAG>
)
FetchContent_MakeAvailable(libassert)
target_link_libraries(your_target libassert::assert)
Expand Down Expand Up @@ -790,7 +794,7 @@ include(FetchContent)
FetchContent_Declare(
libassert
GIT_REPOSITORY https://github.com/jeremy-rifkin/libassert.git
GIT_TAG v2.0.0-alpha # <HASH or TAG>
GIT_TAG v2.0.0-beta # <HASH or TAG>
)
FetchContent_MakeAvailable(libassert)
target_link_libraries(your_target libassert::assert)
Expand All @@ -805,7 +809,7 @@ information.

```sh
git clone https://github.com/jeremy-rifkin/libassert.git
git checkout v2.0.0-alpha
git checkout v2.0.0-beta
mkdir libassert/build
cd libassert/build
cmake .. -DCMAKE_BUILD_TYPE=Release
Expand Down Expand Up @@ -841,7 +845,7 @@ you when installing new libraries.

```ps1
git clone https://github.com/jeremy-rifkin/libassert.git
git checkout v2.0.0-alpha
git checkout v2.0.0-beta
mkdir libassert/build
cd libassert/build
cmake .. -DCMAKE_BUILD_TYPE=Release
Expand Down

0 comments on commit 010b589

Please sign in to comment.