1//===- AffineMapTest.cpp - unit tests for affine map API ------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "mlir/IR/AffineMap.h"
10#include "mlir/IR/Builders.h"
11#include "gtest/gtest.h"
12
13using namespace mlir;
14
15// Test AffineMap replace API for the zero result case.
16TEST(AffineMapTest, inferMapFromAffineExprs) {
17 MLIRContext ctx;
18 OpBuilder b(&ctx);
19 AffineMap map = b.getEmptyAffineMap();
20 DenseMap<AffineExpr, AffineExpr> replacements;
21 map.replace(map: replacements);
22 EXPECT_EQ(map, map);
23}
24

source code of mlir/unittests/IR/AffineMapTest.cpp