tiny.hypothesis.Config
Defined in value.
API (14)
Actions
Public operations.
Fields and members
Public fields and members.
max_choicesmax_examplesmax_input_bytesmax_replaysmax_shrinkspersist_failuresreport_failuresseedtest_name
Source
Source: lib/hypothesis/src/value.zig:8
zig
pub const Config = struct { max_examples: u32 = 100, max_replays: u32 = 100, max_shrinks: u32 = 1000, max_choices: usize = 8192, max_input_bytes: usize = conjecture.default_max_input_bytes, seed: ?u64 = null, persist_failures: bool = true, report_failures: bool = true, test_name: ?[]const u8 = null, pub fn quick() Config { return .{ .max_examples = 10, .max_replays = 10, .max_shrinks = 100, .max_choices = 4096, .max_input_bytes = 256 * 1024, }; } pub fn dev() Config { return .{}; } pub fn ci() Config { return .{ .max_examples = 1000, .max_replays = 1000, .max_shrinks = 5000, .max_input_bytes = 4 * 1024 * 1024, }; } pub fn expectedSlow(max_examples: u32, _: u64) Config { return .{ .max_examples = max_examples, .max_replays = max_examples }; } pub fn toSettings(self: Config) engine.Settings { return .{ .max_examples = @intCast(self.max_examples), .max_replays = @intCast(self.max_replays), .max_choices = self.max_choices, .max_input_bytes = self.max_input_bytes, .max_shrinks = @intCast(self.max_shrinks), .seed = self.seed, .database_path = if (self.persist_failures) "zig-out/pbt-failures" else null, .database_namespace = self.test_name, .report_failure = self.report_failures, }; }};Source: lib/hypothesis/src/root.zig:53
zig
pub const Config = value.Config;Audit
| Definitions | 6 |
|---|---|
| Public names | 12 |
| Members | 9 |
| Version | 26.7.0 |
| Revision | daab053ee433 |