Skip to content

Commit 04ebc8f

Browse files
authored
Add test for doNamelistGroup
Add small test to motivate phab patch - https://reviews.llvm.org/D110331
1 parent e931ae7 commit 04ebc8f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

flang/unittests/Optimizer/InternalNamesTest.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ TEST(InternalNamesTest, doProgramEntry) {
162162
ASSERT_EQ(actual.str(), expectedMangledName);
163163
}
164164

165+
TEST(InternalNamesTest, doNamelistGroup) {
166+
llvm::StringRef actual = NameUniquer::doNamelistGroup({"mod1"}, {}, {"nlg"});
167+
std::string expectedMangledName = "_QMmod1Gnlg";
168+
ASSERT_EQ(actual.str(), expectedMangledName);
169+
}
170+
165171
TEST(InternalNamesTest, deconstructTest) {
166172
std::pair actual = NameUniquer::deconstruct("_QBhello");
167173
auto expectedNameKind = NameUniquer::NameKind::COMMON;

0 commit comments

Comments
 (0)