// Copyright (c) 2026 Progmasoft. // SPDX-License-Identifier: MPL-2.0 WITH AdditionRef-Progmasoft-Exception-2.0 #pragma once #include namespace Progmasoft::Catch3 { /// Generates booleans and shrinks true to the simplest value, false. [[nodiscard]] inline Generator Boolean() { return MakeGenerator( []( Random& random ) { return ( random.Next() & 1U ) != 0; }, []( const bool& value ) { return value ? std::vector{ false } : std::vector{}; } ); } } // namespace Progmasoft::Catch3