Closed jonahtwl closed 3 years ago
Follow the lead from the exception. Check what is happening in Task.java
at line 100 -- this is one source of bug.
Since you say the program runs OK when running manually, check if you updated the tests (both input and expected) appropriately. You can compare the actual and expected files inside of IntelliJ to see if your tests are updated.
I have traced all my data, methods and objects but then I realized that somehow the text-ui test on intellij is having some issues that I can't find answers on the internet.
These are some new issues that I found that shows more issues with the exception and text-ui testing
It somehow throws an exception when I do manual testing for having insufficient parameters, but it allows it when using text-ui testing? Both of which i did the exact same inputs of a (space) after the todo
I am not sure I understand the issue here. First, you said you are getting an IndexOutOfBoundsException, is that resolved? This seems to be unrelated to what you are pointing out in the follow-up.
Next, your input doesn't contain the commands you have shown in the screenshot (at least not the version that is there on GitHub, see screenshot below). So naturally, text-ui-tests will pass.
Please describe the problem faced correctly in detail for us to suggest some actions.
PS: your actual
and expected
have extra newline issues as well.
Thanks for the help Prof @okkhoy, I realized it was a logical error on my end when handling the exceptions itself. Apologies for the confusion.
Oh! No worries :-) Glad you could resolve it. Do shout out if you need help.
Am wondering if anyone has faced the same issue as I can't seem to understand where the issue lies.
(Figure 1. Using text-ui test showed this)
(Figure. 2 Doing manual testing will show this)
This (Figure 2) was printed in System.err.println if anyone is wondering. Have tried changing it back to System.out.println but the issue still remains that the exception was caught and the program was terminated ONLY in the text-ui and not manual.