summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Fuzzer/test/FuzzerUnittest.cpp')
-rw-r--r--llvm/lib/Fuzzer/test/FuzzerUnittest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp b/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp
index eba2663029b..3e1560fe0c5 100644
--- a/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp
+++ b/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp
@@ -741,7 +741,9 @@ TEST(Fuzzer, ForEachNonZeroByte) {
};
typedef std::vector<std::pair<size_t, uint8_t> > Vec;
Vec Res, Expected;
- auto CB = [&](size_t Idx, uint8_t V) { Res.push_back({Idx, V}); };
+ auto CB = [&](size_t FirstFeature, size_t Idx, uint8_t V) {
+ Res.push_back({FirstFeature + Idx, V});
+ };
ForEachNonZeroByte(Ar, Ar + N, 100, CB);
Expected = {{108, 1}, {109, 2}, {118, 3}, {120, 4},
{135, 5}, {137, 6}, {146, 7}, {163, 8}};
OpenPOWER on IntegriCloud