File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1010,6 +1010,14 @@ FUZZ_TARGET(clusterlin_simple_linearize)
10101010 }
10111011 } while (std::next_permutation (perm_linearization.begin (), perm_linearization.end ()));
10121012 }
1013+
1014+ if (optimal) {
1015+ // Compare with a linearization read from the fuzz input.
1016+ auto read = ReadLinearization (depgraph, reader);
1017+ auto read_chunking = ChunkLinearization (depgraph, read);
1018+ auto cmp = CompareChunks (simple_chunking, read_chunking);
1019+ assert (cmp >= 0 );
1020+ }
10131021}
10141022
10151023FUZZ_TARGET (clusterlin_linearize)
@@ -1087,6 +1095,12 @@ FUZZ_TARGET(clusterlin_linearize)
10871095 // If SimpleLinearize finds the optimal result too, they must be equal (if not,
10881096 // SimpleLinearize is broken).
10891097 if (simple_optimal) assert (cmp == 0 );
1098+
1099+ // Compare with a linearization read from the fuzz input.
1100+ auto read = ReadLinearization (depgraph, reader);
1101+ auto read_chunking = ChunkLinearization (depgraph, read);
1102+ auto cmp_read = CompareChunks (chunking, read_chunking);
1103+ assert (cmp_read >= 0 );
10901104 }
10911105}
10921106
You can’t perform that action at this time.
0 commit comments