|
Hegel 0.18.3
Property-based testing for C++
|
Parameters for zoned_datetimes() generator. More...
#include <temporal.h>
Public Attributes | |
| std::optional< AnyGenerator< TimeZone > > | zones |
| std::optional< ZoneSource > | source |
| std::optional< DateTime > | min_value |
| Minimum wall-clock time (inclusive), in whatever zone is drawn. | |
| std::optional< DateTime > | max_value |
| Maximum wall-clock time (inclusive), in whatever zone is drawn. | |
| std::optional< Instant > | min_instant |
| Minimum instant (inclusive). | |
| std::optional< Instant > | max_instant |
| Maximum instant (inclusive). | |
| Precision | precision = Precision::Nanoseconds |
| The drawn wall time is a whole number of these units since midnight. | |
| bool | allow_imaginary = true |
| Ambiguous | ambiguous = Ambiguous::Both |
| Which instant a wall time the clocks repeated means. | |
Parameters for zoned_datetimes() generator.
The bounds are either wall-clock (min_value / max_value) or instant (min_instant / max_instant); setting one of each kind is an error.
| bool hegel::generators::temporal::ZonedDatetimesParams::allow_imaginary = true |
Whether a wall time the clocks skipped may be drawn. Allowed, it is reported with kind TransitionKind::Gap, both offsets and the instant it resolves to with the pre-transition offset; disallowed, another wall time is drawn, and a replayed or shrunk value that lands in a gap is moved past it.
| std::optional<ZoneSource> hegel::generators::temporal::ZonedDatetimesParams::source |
The zone source the names zones draws are resolved against. Default: default_zone_source() as it is when the generator is built.
A generator that zones() returns has a source of its own: setting source as well throws std::invalid_argument. Pass the source to zones() instead.
| std::optional<AnyGenerator<TimeZone> > hegel::generators::temporal::ZonedDatetimesParams::zones |
The generator the zone comes from. Default: zones() over source.
A generator that zones() returns gives its names and its source to the engine, and the zone and the wall time come from one engine draw. Any other generator, such as a zones() generator that was filtered or mapped, draws a zone first, then the wall time in that zone, resolved against source. A name source does not know throws std::invalid_argument on the draw: it never becomes an opaque zone. For opaque zones, use zones() with allow_opaque.