aboutsummaryrefslogtreecommitdiffstats
path: root/util/string/fuzzing/escape_c/main.cpp
blob: 742126416a6c590f002956dc85c697d21cbf0aab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <util/generic/string.h>
#include <util/string/escape.h>

extern "C" int LLVMFuzzerTestOneInput(const ui8* const data, const size_t size) {
    const TString src(reinterpret_cast<const char*>(data), size);
    const auto escaped = EscapeC(src);
    const auto dst = UnescapeC(escaped);

    Y_VERIFY(src == dst);
    return 0;
}