Skip to content

Improve makeXFunction variants (fixes #281, #283, #284)#285

Open
tdeenes wants to merge 3 commits into
mllg:masterfrom
tdeenes:fix-makeAssertionFunction
Open

Improve makeXFunction variants (fixes #281, #283, #284)#285
tdeenes wants to merge 3 commits into
mllg:masterfrom
tdeenes:fix-makeAssertionFunction

Conversation

@tdeenes

@tdeenes tdeenes commented Nov 16, 2025

Copy link
Copy Markdown
Contributor

This PR fixes several issues reported here, here, and here.

All these bugs are related to the makeXFunction variants, which share a lot of code and use the parse(eval(...)) construct internally.

This PR introduces:

  1. A function factory for all three makeXFunction variants;
  2. Uses R's metaprogramming capabilities to generate the functions without using parse(eval(...));
  3. Adds unit tests to cover the reported issues.

Resolves #281, resolves #283, resolves #284.

This PR fixes several issues reported [here](mllg#281), [here](mllg#283), and [here](mllg#284).

All these bugs are related to the `makeXFunction` variants, which share a lot of code and use the `parse(eval(...))` construct internally.

This PR introduces:
1. A function factory for all three `makeXFunction` variants;
2. Uses R's metaprogramming capabilities to generate the functions without using `parse(eval(...))`;
3. Adds unit tests to cover the reported issues.

Resolves mllg#281, resolves mllg#283, resolves mllg#284.
@katrinabrock

katrinabrock commented Nov 17, 2025

Copy link
Copy Markdown

can you pull in the extra test case from my PR?

1685beb#diff-962d4bf4d8ba5fa037da8e6d5bdc3e7852eec1a74da2478472fed258030fcc73

EDIT: Running locally it does pass.

@tdeenes

tdeenes commented Nov 17, 2025

Copy link
Copy Markdown
Contributor Author

Indeed, the unit test case I added is not that thorough as yours. I will update the PR soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants