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

Add failed testcases into testcase available for execution #16

Open
dvishal485 opened this issue Jul 4, 2023 · 0 comments
Open

Add failed testcases into testcase available for execution #16

dvishal485 opened this issue Jul 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dvishal485
Copy link
Owner

Feature request

Failed testcase should be added to a testcase file making it easier to run the code against those failed testcase.


Instructions

  • Automatically add the failed testcase during submission into failed.txt.
  • Overwrite the file everytime the user gets a failed testcase.
  • The testcase should not be appended in testcase.txt as it may contain test cases from a different question and also may exceed the test case limit (provided by Leetcode).
  • Whenever testcase is added in failed.txt, user should be shown appropriate message with command leetcode-runner-cli -r -t textcase.txt -f [codefile_name] which will execute the failed testcase.
  • This should only be triggered on failing submission and not on failing testcase.
  • The failed testcase is present as last_testcase (which is a String) in some variant struct of the enum SubmissionResult.
  • Make sure the string is non-empty before adding it into failed testcase.

Suggestion

To avoid code repetition, a trait can be used to define shared behaviour of these struct (the the variants of enum store) so they may invoke save_failed_testcase() method which does the job.

@dvishal485 dvishal485 added enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant