Add blackbox, valgrind tests

This commit is contained in:
2024-01-30 11:46:49 -08:00
parent eca1b9993a
commit 808ffbcbdf
2 changed files with 27 additions and 10 deletions

View File

@@ -1,16 +1,17 @@
#include <cstddef>
#include "Internal.h"
#include <cstdint>
#include <fstream>
#include <sstream>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
int main(int argc, char **argv) {
for (int i = 1; i < argc; ++i) {
printf("Running: %s\n", argv[i]);
std::ifstream t(argv[i], std::ios::binary);
std::stringstream buffer;
buffer << t.rdbuf();
auto str = buffer.str();
LLVMFuzzerTestOneInput((const uint8_t *)str.data(), str.size());
TestDriver<ConflictSet> driver{(const uint8_t *)str.data(), str.size()};
while (!driver.next())
;
}
}