llvm/llvm/unittests/Option/OptionParsingTest.cpp

//===- unittest/Support/OptionParsingTest.cpp - OptTable tests ------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "llvm/ADT/STLExtras.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptTable.h"
#include "llvm/Option/Option.h"
#include "gtest/gtest.h"

usingnamespacellvm;
usingnamespacellvm::opt;

#if defined(__clang__)
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif

enum ID {};

#define PREFIX
#include "Opts.inc"
#undef PREFIX

static constexpr const StringLiteral PrefixTable_init[] =
static constexpr const ArrayRef<StringLiteral>
    PrefixTable(PrefixTable_init, std::size(PrefixTable_init) - 1);

enum OptionFlags {};

enum OptionVisibility {};

static constexpr OptTable::Info InfoTable[] =;

namespace {
class TestOptTable : public GenericOptTable {};

class TestPrecomputedOptTable : public PrecomputedOptTable {};
}

const char *Args[] =;

// Test fixture
template <typename T> class OptTableTest : public ::testing::Test {};

template <typename T> class DISABLED_OptTableTest : public ::testing::Test {};

// Test both precomputed and computed OptTables with the same suite of tests.
OptTableTestTypes;

TYPED_TEST_SUITE();
TYPED_TEST_SUITE();

TYPED_TEST(OptTableTest, OptionParsing) {}

TYPED_TEST(OptTableTest, ParseWithFlagExclusions) {}

TYPED_TEST(OptTableTest, ParseWithVisibility) {}

TYPED_TEST(OptTableTest, ParseAliasInGroup) {}

TYPED_TEST(OptTableTest, AliasArgs) {}

TYPED_TEST(OptTableTest, IgnoreCase) {}

#if defined(__clang__)
// Disable the warning that triggers on exactly what is being tested.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wself-move"
#endif

TYPED_TEST(OptTableTest, InputArgListSelfAssign) {}

#if defined(__clang__)
#pragma clang diagnostic pop
#endif

TYPED_TEST(OptTableTest, DoNotIgnoreCase) {}

TYPED_TEST(OptTableTest, SlurpEmpty) {}

TYPED_TEST(OptTableTest, Slurp) {}

TYPED_TEST(OptTableTest, SlurpJoinedEmpty) {}

TYPED_TEST(OptTableTest, SlurpJoinedOneJoined) {}

TYPED_TEST(OptTableTest, SlurpJoinedAndSeparate) {}

TYPED_TEST(OptTableTest, SlurpJoinedButSeparate) {}

TYPED_TEST(OptTableTest, FlagAliasToJoined) {}

TYPED_TEST(OptTableTest, FindNearest) {}

TYPED_TEST(DISABLED_OptTableTest, FindNearestFIXME) {}

TYPED_TEST(OptTableTest, ParseGroupedShortOptions) {}

TYPED_TEST(OptTableTest, ParseDashDash) {}

TYPED_TEST(OptTableTest, UnknownOptions) {}

TYPED_TEST(OptTableTest, FlagsWithoutValues) {}

TYPED_TEST(OptTableTest, UnknownGroupedShortOptions) {}

TYPED_TEST(OptTableTest, PrintMultilineHelpText) {}