Skip to content

Commit 8f189ba

Browse files
authored
Remove fuzzer-generated tests for format arg width changes
Since the root cause was identified, the additional tests are more exhaustive and clearer to read
1 parent 5d12a08 commit 8f189ba

File tree

1 file changed

+0
-87
lines changed

1 file changed

+0
-87
lines changed

src/tests/rust_fmt_argument_max_padding.rs

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -44,93 +44,6 @@ fn test_larger_than_int_max_formats_are_returned_verbatim() {
4444
}
4545
}
4646

47-
#[test]
48-
fn test_rust_136932_reduce_fmt_argument_width_and_precision_fuzzer_failures() {
49-
let test_cases: [(MockTime<'_>, &str); 8] = [
50-
(
51-
MockTime::new(-184549375, 93, 71, 166, 14, 1, 2788140547, 166, 65535, 376621239690988031, false, -1499059802, "Z\t\u{3}\u{1}9999"),
52-
"=99\0\0\0Y%66067c\0\0"
53-
),
54-
(
55-
MockTime::new(12255231, 202, 175, 0, 2, 0, 3284320768, 251, 0, -5836660741859442688, false, 65538, ""),
56-
"\0%666666%%3%"
57-
),
58-
(
59-
MockTime::new(1737472, 0, 0, 0, 0, 11, 0, 0, 0, -256, false, 64256, ""),
60-
"%111111C1111111111111117\u{1}\0X\0XXD"
61-
),
62-
(
63-
MockTime::new(3825760, 0, 0, 51, 0, 0, 1044381696, 37, 122, 6584368208339936574, false, 0, ""),
64-
"@%1111111111z\0\0"
65-
),
66-
(
67-
MockTime::new(1090397537, 254, 255, 2, 0, 0, 4294639365, 255, 65535, 10455414982377471, false, -33540827, ""),
68-
"%%\n%5555555%55555555555u555"
69-
),
70-
(
71-
MockTime::new(-21761, 255, 58, 0, 37, 37, 620822272, 255, 43690, 50396945, false, 3, ""),
72-
"%R%S%00000400000R%RR%%%\u{3}\0%\0\u{1b}\u{1b}\u{1b}"
73-
),
74-
(
75-
MockTime::new(13566191, 1, 0, 34, 35, 37, 623190565, 0, 8741, 2457877026632491810, true, 606414171, ""),
76-
"\0\0\0\0\0\0\0\"%2536361%172049423024124\"2\"\"9\"%^^^YN^\""
77-
),
78-
(
79-
MockTime::new(1749024784, 96, 0, 96, 104, 96, 620796776, 0, 15968, 0, false, 6307376, ""),
80-
"%u\0\n\0\0\u{10}\0`\u{31b}@\0\0\x002>`\0%33333333s33333#33333333333333333333333333333333333\u{13}33333333333u\0\0\0\0\0%u\u{4}\0\0\0\u{10}\0`"
81-
),
82-
];
83-
84-
for (time, format) in test_cases {
85-
let err = get_format_err(&time, format);
86-
assert!(matches!(err, Error::WriteZero));
87-
}
88-
}
89-
90-
#[test]
91-
#[rustfmt::skip]
92-
fn test_rust_136932_reduce_fmt_argument_width_and_precision_fuzzer_failures_bytes() {
93-
let test_cases: [(MockTime<'_>, &[u8]); 8] = [
94-
(
95-
MockTime::new(674049317, 244, 42, 40, 180, 106, 4096628178, 1, 0, 3239384020795663872, false, 1734567725, ""),
96-
b"\xd6\x00\x00\x00\x00\xda\xc7\xda%\xc1B%-666666F\xff\xff\xff"
97-
),
98-
(
99-
MockTime::new(167837442, 64, 255, 10, 96, 255, 4294901760, 255, 65535, -1, true, 235864006, ""),
100-
b"\x88%%%%%%%%%%%%%777777%%%\x0e"
101-
),
102-
(
103-
MockTime::new(1375731722, 82, 82, 82, 85, 82, 1392508927, 82, 20992, -48935437123235246, false, -1145324613, ""),
104-
b"\xbb\xbb%\x00\x00RR%\xbb\xbb\x00\x00\x00B%00124261%R\xff\x00\xbb\xbb\xbb\xbb\x00\x00\x00\x00\x00RRR\xa6RR"
105-
),
106-
(
107-
MockTime::new(0, 0, 0, 0, 92, 0, 704643072, 0, 242, 5548434740937171968, false, 0, ""),
108-
b"\x00\x00%7777773%"
109-
),
110-
(
111-
MockTime::new(458557, 0, 64, 128, 128, 128, 4278222976, 255, 65535, -205, true, 65535, "\0\0\0"),
112-
b"\x00%00324248X14\xff"
113-
),
114-
(
115-
MockTime::new(-774831746, 209, 209, 209, 13, 13, 218959117, 13, 3341, 0, false, 218955776, ":\r\r"),
116-
b"\xff\x00\xff\xff\x08%%%%%%%%%%%%%5%%%%3333333%%"
117-
),
118-
(
119-
MockTime::new(130826, 3, 223, 29, 37, 37, 623191333, 93, 13861, 2892759177136963579, true, 623191333, "!I\u{1}\0\u{3}"),
120-
b"\xdf\x1d%\x1d?\xff\xdb\xfe#\x15I%$\x00\x00\x00%]%86995%%6\xfb"
121-
),
122-
(
123-
MockTime::new(37454602, 0, 0, 0, 0, 9, 1048576, 255, 65535, -1, false, 255, "\0\0\0\0\0/\0"),
124-
b"y%999999%q)%%z"
125-
),
126-
];
127-
128-
for (time, format) in test_cases {
129-
let err = get_format_err_bytes(&time, format);
130-
assert!(matches!(err, Error::WriteZero));
131-
}
132-
}
133-
13447
#[test]
13548
#[cfg(feature = "alloc")]
13649
fn test_format_specifiers_large_width_success() {

0 commit comments

Comments
 (0)