also looking at this
Add reproducible randomized test order
#29
18 files
+487
-42
| @@ -32,6 +32,8 @@ pub const TestOptions = struct { | ||
| 32 | 32 | retries: usize = 0, |
| 33 | 33 | repeat: usize = 1, |
| 34 | 34 | fail_on_flaky: bool = false, |
| 35 | shuffle: bool = false, | |
| 36 | seed: ?u64 = null, | |
| 35 | 37 | }; |
| 36 | 38 | |
| 37 | 39 | pub const ParallelOptions = struct { |
| @@ -207,6 +209,8 @@ test "TestConfig defaults match CLI discovery defaults" { | ||
| 207 | 209 | try std.testing.expectEqual(@as(usize, 0), config.test_options.retries); |
| 208 | 210 | try std.testing.expectEqual(@as(usize, 1), config.test_options.repeat); |
| 209 | 211 | try std.testing.expect(!config.test_options.fail_on_flaky); |
| 212 | try std.testing.expect(!config.test_options.shuffle); | |
| 213 | try std.testing.expect(config.test_options.seed == null); | |
| 210 | 214 | try std.testing.expect(config.sharding.index == null); |
| 211 | 215 | try std.testing.expect(config.sharding.count == null); |
| 212 | 216 | try std.testing.expect(!config.parallel.enabled); |
| @@ -247,6 +251,8 @@ test "ConfigLoader loads supported JSON and rejects unknown keys" { | ||
| 247 | 251 | try std.testing.expectEqual(@as(usize, 1), config.test_options.retries); |
| 248 | 252 | try std.testing.expectEqual(@as(usize, 2), config.test_options.repeat); |
| 249 | 253 | try std.testing.expect(!config.test_options.fail_on_flaky); |
| 254 | try std.testing.expect(config.test_options.shuffle); | |
| 255 | try std.testing.expectEqual(@as(?u64, 42), config.test_options.seed); | |
| 250 | 256 | try std.testing.expectEqual(@as(?usize, 1), config.sharding.index); |
| 251 | 257 | try std.testing.expectEqual(@as(?usize, 1), config.sharding.count); |
| 252 | 258 | |