chromium/base/test/confirm_fuzztest_init.cc

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

#include <string>
#include <vector>

#include "base/compiler_specific.h"
#include "base/no_destructor.h"
#include "base/test/confirm_fuzztest_init_buildflags.h"
#include "base/test/fuzztest_init_helper.h"
#include "third_party/fuzztest/src/fuzztest/init_fuzztest.h"

namespace {

static void RealInitFunction(int argc, char** argv) {}

// base/test:test_support is used in test suites containing fuzztests
// and those without. In those without, we want to avoid depending
// on fuzztest's complex dependencies, but on those with fuzztests
// we need to call InitFuzzTest. So, use a static initializer to fill
// in a function pointer in those cases.
class FuzztestInitializer {};

FuzztestInitializer static_initializer;  // NOLINT

}  // namespace