refactor(tests): Inline all language-specific parse methods #530

Merged
wetneb merged 3 commits from wetneb/remove_lang_specific_parse_methods into main 2025-07-24 15:17:19 +02:00 AGit
Owner

I get annoyed of the need to define a new TestContext::parse_blah method every time I write a test using a language that's not used in unit tests already. It feels easy enough to provide a filename from which the language can be generated.

So this PR removes them… but it's really a matter of taste, I can also live with adding those methods.

I get annoyed of the need to define a new `TestContext::parse_blah` method every time I write a test using a language that's not used in unit tests already. It feels easy enough to provide a filename from which the language can be generated. So this PR removes them… but it's really a matter of taste, I can also live with adding those methods.
ada4a approved these changes 2025-07-24 15:09:58 +02:00
ada4a left a comment
Owner

Fair enough.. though it's still a bit annoying that we need to look-up LangProfiles for languages that we know we support. But I don't know of any solution other than maybe definining a const (or, well, a LazyLock) for each language and referring to that when calling ctx.parse – which arguably wouldn't even save us that many characters

Fair enough.. though it's still a bit annoying that we need to look-up `LangProfile`s for languages that we know we support. But I don't know of any solution other than maybe definining a const (or, well, a `LazyLock`) for each language and referring to _that_ when calling `ctx.parse` – which arguably wouldn't even save us that many characters
wetneb merged commit bb13819638 into main 2025-07-24 15:17:19 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: mergiraf/mergiraf#530
No description provided.