llvm/mlir/unittests/TableGen/PassGenTest.cpp

//===- PassGenTest.cpp - TableGen PassGen 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 "mlir/Pass/Pass.h"
#include "llvm/ADT/STLExtras.h"

#include "gmock/gmock.h"

std::unique_ptr<mlir::Pass> createTestPassWithCustomConstructor(int v = 0);

#define GEN_PASS_DECL
#define GEN_PASS_REGISTRATION
#include "PassGenTest.h.inc"

#define GEN_PASS_DEF_TESTPASS
#define GEN_PASS_DEF_TESTPASSWITHOPTIONS
#define GEN_PASS_DEF_TESTPASSWITHCUSTOMCONSTRUCTOR
#include "PassGenTest.h.inc"

struct TestPass : public impl::TestPassBase<TestPass> {};

TEST(PassGenTest, defaultGeneratedConstructor) {}

TEST(PassGenTest, PassClone) {}

struct TestPassWithOptions
    : public impl::TestPassWithOptionsBase<TestPassWithOptions> {};

TEST(PassGenTest, PassOptions) {}

struct TestPassWithCustomConstructor
    : public impl::TestPassWithCustomConstructorBase<
          TestPassWithCustomConstructor> {};

std::unique_ptr<mlir::Pass> createTestPassWithCustomConstructor(int v) {}

TEST(PassGenTest, PassCloneWithCustomConstructor) {}