chromium/third_party/zlib/contrib/tests/utils_unittest.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the Chromium source repository LICENSE file.

#include "infcover.h"

#include <cstddef>
#include <vector>

#include "compression_utils_portable.h"
#include "gtest.h"

#if !defined(CMAKE_STANDALONE_UNITTESTS)
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"

#include "third_party/zlib/contrib/minizip/unzip.h"
#include "third_party/zlib/contrib/minizip/zip.h"
#endif

#include "zlib.h"

void TestPayloads(size_t input_size, zlib_internal::WrapperType type,
                  const int compression_level = Z_DEFAULT_COMPRESSION) {}

TEST(ZlibTest, ZlibWrapper) {}

TEST(ZlibTest, GzipWrapper) {}

TEST(ZlibTest, RawWrapper) {}

TEST(ZlibTest, LargePayloads) {}

TEST(ZlibTest, CompressionLevels) {}

TEST(ZlibTest, InflateCover) {}

TEST(ZlibTest, InflateCVE) {}

TEST(ZlibTest, DeflateStored) {}

TEST(ZlibTest, StreamingInflate) {}

TEST(ZlibTest, CRCHashBitsCollision) {}

TEST(ZlibTest, CRCHashAssert) {}

// Fuzzer generated.
static const uint8_t checkMatchCrashData[] =;

TEST(ZlibTest, CheckMatchCrash) {}

TEST(ZlibTest, DeflateRLEUninitUse) {}

static const char zFixedCorruptionData[] =;

TEST(ZlibTest, DeflateZFixedCorruption) {}

TEST(ZlibTest, DeflateCopy) {}

TEST(ZlibTest, GzipStored) {}

TEST(ZlibTest, DeflateBound) {}

// TODO(gustavoa): make these tests run standalone.
#ifndef CMAKE_STANDALONE_UNITTESTS

TEST(ZlibTest, ZipFilenameCommentSize) {}

TEST(ZlibTest, ZipExtraFieldSize) {}

#endif