#include "mlir/IR/Attributes.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/Parser/Parser.h"
#include "gtest/gtest.h"
#include <optional>
usingnamespacemlir;
namespace {
struct TestProperties { … };
bool operator==(const TestProperties &lhs, TestProperties &rhs) { … }
static LogicalResult
setPropertiesFromAttribute(TestProperties &prop, Attribute attr,
function_ref<InFlightDiagnostic()> emitError) { … }
static Attribute getPropertiesAsAttribute(MLIRContext *ctx,
const TestProperties &prop) { … }
inline llvm::hash_code computeHash(const TestProperties &prop) { … }
class OpWithProperties : public Op<OpWithProperties> { … };
class OpWithoutProperties : public Op<OpWithoutProperties> { … };
class TestOpPropertiesDialect : public Dialect { … };
constexpr StringLiteral mlirSrc = …;
TEST(OpPropertiesTest, Properties) { … }
TEST(OpPropertiesTest, FailedProperties) { … }
TEST(OpPropertiesTest, DefaultValues) { … }
TEST(OpPropertiesTest, Cloning) { … }
TEST(OpPropertiesTest, Equivalence) { … }
TEST(OpPropertiesTest, getOrAddProperties) { … }
constexpr StringLiteral withoutPropertiesAttrsSrc = …;
TEST(OpPropertiesTest, withoutPropertiesDiscardableAttrs) { … }
}