| 39 | { |
| 40 | public: |
| 41 | struct TestVariant |
| 42 | { |
| 43 | TestVariant(std::string_view _baseName, CompilerStack::State _stopAfter): |
| 44 | baseName(_baseName), |
| 45 | stopAfter(_stopAfter) |
| 46 | {} |
| 47 | |
| 48 | std::string name() const |
| 49 | { |
| 50 | return stopAfter == CompilerStack::State::Parsed ? "parseOnly" : ""; |
| 51 | } |
| 52 | |
| 53 | std::string astFilename() const |
| 54 | { |
| 55 | return std::string(baseName) + |
| 56 | (name().empty() ? "" : "_") + |
| 57 | name() + |
| 58 | ".json"; |
| 59 | } |
| 60 | |
| 61 | std::string baseName; |
| 62 | CompilerStack::State stopAfter; |
| 63 | std::string result; |
| 64 | std::string expectation; |
| 65 | }; |
| 66 | |
| 67 | static std::unique_ptr<TestCase> create(Config const& _config) |
| 68 | { |
no outgoing calls