2021-10-30 04:25:12 +08:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
|
|
#include "src/libfuzzer/libfuzzer_macro.h"
|
|
|
|
#include "luau.pb.h"
|
|
|
|
|
2022-02-25 07:53:37 +08:00
|
|
|
std::vector<std::string> protoprint(const luau::ModuleSet& stat, bool types);
|
2021-10-30 04:25:12 +08:00
|
|
|
|
2022-02-25 07:53:37 +08:00
|
|
|
DEFINE_PROTO_FUZZER(const luau::ModuleSet& message)
|
2021-10-30 04:25:12 +08:00
|
|
|
{
|
2022-02-25 07:53:37 +08:00
|
|
|
std::vector<std::string> sources = protoprint(message, true);
|
2021-10-30 04:25:12 +08:00
|
|
|
|
2022-02-25 07:53:37 +08:00
|
|
|
for (size_t i = 0; i < sources.size(); i++)
|
|
|
|
{
|
|
|
|
printf("Module 'l%d':\n", int(i));
|
|
|
|
printf("%s\n", sources[i].c_str());
|
|
|
|
}
|
2021-10-30 04:25:12 +08:00
|
|
|
}
|