diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-03-07 17:03:47 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-03-07 16:55:34 -0500 |
commit | fab0e5ba7f2777b86f1487234ed7cc4be9f72ea8 (patch) | |
tree | 19d52d1b9b2276eb388da5a018fb50f5180bfa6f /src/test/fuzz/script.cpp | |
parent | 5e12a61044b15e4e29ac786135a9ebb72d1bfc61 (diff) |
fuzz: Add assert(script == decompressed_script)
Diffstat (limited to 'src/test/fuzz/script.cpp')
-rw-r--r-- | src/test/fuzz/script.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/fuzz/script.cpp b/src/test/fuzz/script.cpp index ed4fe21957..0d18784302 100644 --- a/src/test/fuzz/script.cpp +++ b/src/test/fuzz/script.cpp @@ -33,10 +33,12 @@ void test_one_input(const std::vector<uint8_t>& buffer) std::vector<unsigned char> compressed; if (CompressScript(script, compressed)) { const unsigned int size = compressed[0]; + compressed.erase(compressed.begin()); assert(size >= 0 && size <= 5); CScript decompressed_script; const bool ok = DecompressScript(decompressed_script, size, compressed); assert(ok); + assert(script == decompressed_script); } for (unsigned int size = 0; size < 6; ++size) { |