Skip to content

Commit 40e0d2e

Browse files
committed
Add single for loop
1 parent 016b533 commit 40e0d2e

File tree

1 file changed

+6
-23
lines changed

1 file changed

+6
-23
lines changed

llvm/unittests/TargetParser/RISCVISAInfoTest.cpp

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -653,29 +653,12 @@ TEST(ParseArchString, RejectsConflictingExtensions) {
653653
"'xwchc' and 'zcb' extensions are incompatible");
654654
}
655655

656-
for (StringRef Input : {"rv64i_xqcisls0p2"}) {
657-
EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
658-
"'xqcisls' is only supported for 'rv32'");
659-
}
660-
661-
for (StringRef Input : {"rv64i_xqcia0p2"}) {
662-
EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
663-
"'xqcia' is only supported for 'rv32'");
664-
}
665-
666-
for (StringRef Input : {"rv64i_xqcicsr0p2"}) {
667-
EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
668-
"'xqcicsr' is only supported for 'rv32'");
669-
}
670-
671-
for (StringRef Input : {"rv64i_xqcilsm0p2"}) {
672-
EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
673-
"'xqcilsm' is only supported for 'rv32'");
674-
}
675-
676-
for (StringRef Input : {"rv64i_xqcics0p2"}) {
677-
EXPECT_EQ(toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
678-
"'xqcics' is only supported for 'rv32'");
656+
for (StringRef Input :
657+
{"rv64i_xqcisls0p2", "rv64i_xqcia0p2", "rv64i_xqcicsr0p2",
658+
"rv64i_xqcilsm0p2", "rv64i_xqcics0p2"}) {
659+
EXPECT_THAT(
660+
toString(RISCVISAInfo::parseArchString(Input, true).takeError()),
661+
::testing::EndsWith(" is only supported for 'rv32'"));
679662
}
680663
}
681664

0 commit comments

Comments
 (0)