emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[HW1] How to know which specific test case we failed on and further debug? #212

Closed bianshuyang closed 2 years ago

bianshuyang commented 2 years ago

I have searched for over 15 minutes on the internet for learning JUnit but to no avail. My sorting algorithm clearly was not successful in some margin cases, but JUnit only tells me that I am not right for a number at a certain position, which makes it incredible for me to debug the wrong array that I missorted. How can I know which specific array I failed on in its entirety? I tried enclosing a try ... catch.. Statement but it didn't help.

bianshuyang commented 2 years ago

Used python to create some myself, close this issue