llvm/mlir/unittests/IR/DialectTest.cpp

//===- DialectTest.cpp - Dialect unit 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/IR/Dialect.h"
#include "mlir/IR/DialectInterface.h"
#include "mlir/Support/TypeID.h"
#include "gtest/gtest.h"

usingnamespacemlir;
usingnamespacemlir::detail;

namespace {
struct TestDialect : public Dialect {};
struct AnotherTestDialect : public Dialect {};

TEST(DialectDeathTest, MultipleDialectsWithSameNamespace) {}

struct SecondTestDialect : public Dialect {};

struct TestDialectInterfaceBase
    : public DialectInterface::Base<TestDialectInterfaceBase> {};

struct TestDialectInterface : public TestDialectInterfaceBase {};

struct SecondTestDialectInterface : public TestDialectInterfaceBase {};

TEST(Dialect, DelayedInterfaceRegistration) {}

TEST(Dialect, RepeatedDelayedRegistration) {}

namespace {
/// A dummy extension that increases a counter when being applied and
/// recursively adds additional extensions.
struct DummyExtension : DialectExtension<DummyExtension, TestDialect> {};
} // namespace

TEST(Dialect, NestedDialectExtension) {}

TEST(Dialect, SubsetWithExtensions) {}

} // namespace