diff options
author | Kostya Serebryany <kcc@google.com> | 2015-05-22 22:35:31 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2015-05-22 22:35:31 +0000 |
commit | f342459aa4f7aff7ae02e52513322f7f6921a2c2 (patch) | |
tree | 89fe8585b34a7c9e676201bc1085ff512710aece /llvm/lib/Fuzzer/test/FuzzerUnittest.cpp | |
parent | cb0829943bd6c7c1947d86ffffb23a274b1fba0d (diff) | |
download | bcm5719-llvm-f342459aa4f7aff7ae02e52513322f7f6921a2c2.tar.gz bcm5719-llvm-f342459aa4f7aff7ae02e52513322f7f6921a2c2.zip |
[lib/Fuzzer] extend the fuzzer interface to allow user-supplied mutators
llvm-svn: 238059
Diffstat (limited to 'llvm/lib/Fuzzer/test/FuzzerUnittest.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/test/FuzzerUnittest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp b/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp index 7b429b722b6..50f2f99760e 100644 --- a/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp +++ b/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp @@ -51,7 +51,10 @@ TEST(Fuzzer, CrossOver) { for (size_t Len = 1; Len < 8; Len++) { std::set<Unit> FoundUnits, ExpectedUnitsWitThisLength; for (int Iter = 0; Iter < 3000; Iter++) { - CrossOver(A, B, &C, Len); + C.resize(Len); + size_t NewSize = CrossOver(A.data(), A.size(), B.data(), B.size(), + C.data(), C.size()); + C.resize(NewSize); FoundUnits.insert(C); } for (const Unit &U : Expected) |