-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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 commandleetcode-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 aString
) in some variant struct of the enumSubmissionResult
. - 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.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request