Skip to content

Commit 439955b

Browse files
committed
[llvm] add mustache verification tool
1 parent 7337a99 commit 439955b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

llvm/tools/mustache/mustache.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,20 @@ void runThroughTest(StringRef InputFile) {
8585
std::string ActualStr;
8686
llvm::raw_string_ostream OS(ActualStr);
8787
T.render(*Data, OS);
88-
if (ExpectedStr == ActualStr)
88+
if (ExpectedStr == ActualStr) {
8989
Success++;
90-
else
90+
} else {
9191
llvm::outs() << "Test Failed: " << Name << "\n";
92+
}
9293
Total++;
9394
}
95+
9496
llvm::outs() << "Result " << Success << "/" << Total << " succeeded\n";
9597
}
9698
int main(int argc, char **argv) {
9799
llvm::cl::ParseCommandLineOptions(argc, argv);
98-
for (const auto &FileName : InputFiles)
100+
for (const auto &FileName : InputFiles) {
99101
runThroughTest(FileName);
102+
}
100103
return 0;
101104
}

0 commit comments

Comments
 (0)