diff options
author | Kostya Serebryany <kcc@google.com> | 2016-09-21 22:42:17 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-09-21 22:42:17 +0000 |
commit | 29bb6640759f55a7092963dca3ef0287a9f5d140 (patch) | |
tree | 6ed23cf0c51af0d35971870baf7f6b28980e8247 /llvm/lib/Fuzzer/test/FuzzerUnittest.cpp | |
parent | 0509203952fa0e6c1073dab2d9cce1e3beabab9f (diff) | |
download | bcm5719-llvm-29bb6640759f55a7092963dca3ef0287a9f5d140.tar.gz bcm5719-llvm-29bb6640759f55a7092963dca3ef0287a9f5d140.zip |
[libFuzzer] add stats to the corpus; more refactoring
llvm-svn: 282121
Diffstat (limited to 'llvm/lib/Fuzzer/test/FuzzerUnittest.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/test/FuzzerUnittest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp b/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp index 4bad901ac59..fdde1d3fbb9 100644 --- a/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp +++ b/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp @@ -5,6 +5,7 @@ // with ASan) involving C++ standard library types when using libcxx. #define _LIBCPP_HAS_NO_ASAN +#include "FuzzerCorpus.h" #include "FuzzerInternal.h" #include "FuzzerDictionary.h" #include "FuzzerMutate.h" @@ -582,7 +583,7 @@ TEST(Corpus, Distribution) { size_t N = 10; size_t TriesPerUnit = 1<<20; for (size_t i = 0; i < N; i++) - C.push_back(Unit{ static_cast<uint8_t>(i) }); + C.AddToCorpus(Unit{ static_cast<uint8_t>(i) }); std::vector<size_t> Hist(N); for (size_t i = 0; i < N * TriesPerUnit; i++) { |