Skip to content
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

Ignore bonus tests #37

Merged
merged 2 commits into from
Feb 2, 2024
Merged

Ignore bonus tests #37

merged 2 commits into from
Feb 2, 2024

Conversation

ErikSchierboom
Copy link
Member

@ErikSchierboom ErikSchierboom commented Feb 1, 2024

exercism/prolog#289 aims to introduce some optional bonus tests. We should make sure that the test runner ignores these when running the tests.

@ErikSchierboom ErikSchierboom requested a review from a team as a code owner February 1, 2024 08:38
@@ -0,0 +1,33 @@
pending :-
current_prolog_flag(argv, ['--all'|_]).
pending :-

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you'll have to add a similar mechanism for bonus as used in pending.
Although it appears to be better options to block tests: https://www.swi-prolog.org/pldoc/man?section=unitbox
Using blocked for example, I'll look into it for a proper suggestion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

Copy link

@cpmachado cpmachado Feb 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there again, so after checking the reference, same link as above, we're correctly using condition(I wasn't on my PR).
We would have to replicate a similar mechanism to pending or redesign this, we could have a composite for the pending conditions.
Condition is unique and can only take an atom, thus something like condition(pending, bonus) wouldn't work, but we could just have condition(bonus) for the bonus clause.
I'm going to find some time after work to look further into this, for a better solution.
I'll use my PR on triangle as a POC(exercism/prolog#289)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ErikSchierboom Just updated the other PR (exercism/prolog#289) with the same mechanism as pending, please do check it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works! Great.

@ErikSchierboom ErikSchierboom merged commit 204db09 into main Feb 2, 2024
1 check passed
@ErikSchierboom ErikSchierboom deleted the bonus-tests branch July 30, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants