-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm] add tool to verify mustache library #111487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ With the latest revision this PR passed the Python code formatter. |
Yes this a utility purely for internal use, I did not realize there was already a utils folder |
ah, right. I forgot we build things under Overall the patch is much better. Once it's moved to |
I believe doc files that are used for man page generation are required to use .rst, because we don't want ability to generate man pages with just a sphinx dependency. |
@@ -0,0 +1,12 @@ | |||
llvm-mustachespec - LLVM tool to test Mustache Compliance Library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
llvm-mustachespec - LLVM tool to test Mustache Compliance Library | |
llvm-mustachespec - LLVM tool to test Mustache Library Compliance |
Possibly?
llvm-mustachespec - LLVM tool to test Mustache Compliance Library | ||
================================================================= | ||
|
||
llvm-mustachespec test the mustache spec conformance of the LLVM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
llvm-mustachespec test the mustache spec conformance of the LLVM | |
llvm-mustachespec tests the mustache spec conformance of the LLVM |
================================================================= | ||
|
||
llvm-mustachespec test the mustache spec conformance of the LLVM | ||
mustache library. The spec can be found here https://github.com/mustache/spec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mustache library. The spec can be found here https://github.com/mustache/spec | |
mustache library. The spec can be found here: `Mustache Spec <https://github.com/mustache/spec>`_. |
or something.
|
||
.. program:: llvm-mustachespec | ||
|
||
Outputs the number of tests failures and success in the spec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outputs the number of tests failures and success in the spec | |
Outputs the number of tests failures and successes in the spec. |
@@ -0,0 +1,104 @@ | |||
//===- llvm-mustachespec.cpp - The LLVM Modular Optimizer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//===- llvm-mustachespec.cpp - The LLVM Modular Optimizer |
We no longer include this line.
// Triple Mustache - Standalone | ||
// Triple Mustache With Padding | ||
// Standalone Indentation | ||
// Implicit Iterator - Triple mustache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether it would make sense to include this list directly in the program, and report these as "xfail"? That way it's easy to see whether there are any unexpected failures without manually comparing to this list.
cl::OneOrMore); | ||
|
||
void runThroughTest(StringRef InputFile) { | ||
llvm::outs() << "Running Tests: " << InputFile << "\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
llvm::outs() << "Running Tests: " << InputFile << "\n"; | |
outs() << "Running Tests: " << InputFile << "\n"; |
You're using using namespace llvm
, don't need all these llvm::
prefixes.
if (auto EC = BufferOrError.getError()) { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the error get reported?
return; | ||
} | ||
// Get test | ||
Array *Obj = (*Json).getAsObject()->getArray("tests"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array *Obj = (*Json).getAsObject()->getArray("tests"); | |
Array *Obj = Json->getAsObject()->getArray("tests"); |
This looks a bit odd, does this work?
if (Partials) { | ||
for (auto &PartialPairs : *Partials->getAsObject()) { | ||
const auto &[Partial, Str] = PartialPairs; | ||
T.registerPartial((*Str.getAsString()).str(), Partial.str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
T.registerPartial((*Str.getAsString()).str(), Partial.str()); | |
T.registerPartial(Str.getAsString()->str(), Partial.str()); |
This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in llvm#111487. Co-authored-by: Peter Chou <[email protected]>
This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in #111487. Co-authored-by: Peter Chou <[email protected]>
This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in #111487. Co-authored-by: Peter Chou <[email protected]>
This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in #111487. Co-authored-by: Peter Chou <[email protected]>
This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in #111487. Co-authored-by: Peter Chou <[email protected]>
This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in #111487. Co-authored-by: Peter Chou <[email protected]>
This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in #111487. Co-authored-by: Peter Chou <[email protected]>
This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in #111487. Co-authored-by: Peter Chou <[email protected]>
#142813) This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in #111487. Co-authored-by: Peter Chou <[email protected]>
This was completed in #142813 |
llvm#142813) This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in llvm#111487. Co-authored-by: Peter Chou <[email protected]>
llvm#142813) This is a cli tool to that tests the conformance of LLVM's mustache implementation against the public Mustache spec, hosted at https://github.com/mustache/spec. This is a revised version of the patches in llvm#111487. Co-authored-by: Peter Chou <[email protected]>
Depends on #105893
Adds a tool to verify the moustache spec