diff options
| author | Kostya Serebryany <kcc@google.com> | 2019-02-09 00:16:21 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2019-02-09 00:16:21 +0000 |
| commit | 0fda9dcbe9afe607fe9d25a6d733126bed3d0a3b (patch) | |
| tree | 3728c0cc6d439f6ed34bde54a37f48e97044c4f1 /compiler-rt/lib/fuzzer/tests | |
| parent | 91970564191bfc40ea9f2c8d32cc1fb6c314515c (diff) | |
| download | bcm5719-llvm-0fda9dcbe9afe607fe9d25a6d733126bed3d0a3b.tar.gz bcm5719-llvm-0fda9dcbe9afe607fe9d25a6d733126bed3d0a3b.zip | |
[libFuzzer] more refactoring; change some of the exit codes (timeout, OOM, interrupt) so that the parent process can distinguish those
llvm-svn: 353584
Diffstat (limited to 'compiler-rt/lib/fuzzer/tests')
| -rw-r--r-- | compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp b/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp index eec7d946125..46abc156fa3 100644 --- a/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp +++ b/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp @@ -644,8 +644,9 @@ static void Merge(const std::string &Input, size_t NumNewFeatures) { Merger M; Vector<std::string> NewFiles; + Set<uint32_t> NewFeatures; EXPECT_TRUE(M.Parse(Input, true)); - EXPECT_EQ(NumNewFeatures, M.Merge({}, &NewFiles)); + EXPECT_EQ(NumNewFeatures, M.Merge({}, &NewFeatures, &NewFiles)); EQ(NewFiles, Result); } @@ -689,6 +690,7 @@ TEST(Merge, Good) { Vector<std::string> NewFiles; + Set<uint32_t> NewFeatures; EXPECT_TRUE(M.Parse("3\n2\nAA\nBB\nC\n" "STARTED 0 1000\nDONE 0 1 2 3\n" @@ -702,7 +704,7 @@ TEST(Merge, Good) { EQ(M.Files[0].Features, {1, 2, 3}); EQ(M.Files[1].Features, {4, 5, 6}); EQ(M.Files[2].Features, {1, 3, 6}); - EXPECT_EQ(0U, M.Merge({}, &NewFiles)); + EXPECT_EQ(0U, M.Merge({}, &NewFeatures, &NewFiles)); EQ(NewFiles, {}); EXPECT_TRUE(M.Parse("3\n1\nA\nB\nC\n" @@ -713,7 +715,7 @@ TEST(Merge, Good) { EQ(M.Files[0].Features, {1, 2, 3}); EQ(M.Files[1].Features, {4, 5, 6}); EQ(M.Files[2].Features, {1, 3, 6}); - EXPECT_EQ(3U, M.Merge({}, &NewFiles)); + EXPECT_EQ(3U, M.Merge({}, &NewFeatures, &NewFiles)); EQ(NewFiles, {"B"}); // Same as the above, but with InitialFeatures. @@ -727,7 +729,7 @@ TEST(Merge, Good) { InitialFeatures.insert(1); InitialFeatures.insert(2); InitialFeatures.insert(3); - EXPECT_EQ(3U, M.Merge(InitialFeatures, &NewFiles)); + EXPECT_EQ(3U, M.Merge(InitialFeatures, &NewFeatures, &NewFiles)); EQ(NewFiles, {"B"}); } |

