fuzz.cpp
Go to the documentation of this file.
00001 /*
00002     __ _____ _____ _____
00003  __|  |   __|     |   | |  JSON for Modern C++ (fuzz test support)
00004 |  |  |__   |  |  | | | |  version 2.0.0
00005 |_____|_____|_____|_|___|  https://github.com/nlohmann/json
00006 
00007 Run "make fuzz_testing" and follow the instructions.
00008 
00009 Licensed under the MIT License <http://opensource.org/licenses/MIT>.
00010 */
00011 
00012 #include <json.hpp>
00013 
00014 using json = nlohmann::json;
00015 
00016 int main()
00017 {
00018 #ifdef __AFL_HAVE_MANUAL_CONTROL
00019     while (__AFL_LOOP(1000))
00020     {
00021 #endif
00022         try
00023         {
00024             json j(std::cin);
00025             std::cout << j << std::endl;
00026         }
00027         catch (std::invalid_argument& e)
00028         {
00029             std::cout << "Invalid argument in parsing" << e.what() << '\n';
00030         }
00031 #ifdef __AFL_HAVE_MANUAL_CONTROL
00032     }
00033 #endif
00034 }


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:02