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

Assert #58

Merged
merged 5 commits into from
Dec 10, 2023
Merged

Assert #58

merged 5 commits into from
Dec 10, 2023

Conversation

seblyng
Copy link
Owner

@seblyng seblyng commented Dec 9, 2023

This adds a assert flag to the subcommand run to be able to assert that the answer is still correct, for example after a refactor.

Example use:
image
image
image
image
image

@seblyng
Copy link
Owner Author

seblyng commented Dec 9, 2023

Hmm, maybe I should add more colorful and cool output for the other cases as well?

src/main.rs Outdated
@@ -68,6 +69,12 @@ async fn main() -> Result<(), AocError>
.required(false)
.action(clap::ArgAction::SetTrue)
.help("Run the day with the \"test\" file"),
Arg::new("assert")
.short('a') // TODO: Should we have a short flag? If so, is `a` ok?
Copy link
Owner Author

Choose a reason for hiding this comment

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

Should we have a short flag?

src/util/submit.rs Outdated Show resolved Hide resolved
@seblyng seblyng requested a review from sivertjoe December 10, 2023 12:38
Copy link
Collaborator

@sivertjoe sivertjoe left a comment

Choose a reason for hiding this comment

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

Going to use this starting today

@seblyng seblyng merged commit 7532b1a into master Dec 10, 2023
1 check passed
@seblyng seblyng mentioned this pull request Dec 10, 2023
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