For homework and projects, it may be useful to compare actual and expected output side-by-side. Eclipse has a nice comparison view that will align the different outputs and highlight the differences, even differences in whitespaces that may be otherwise difficult to see.
TABLE OF CONTENTS
Eclipse screenshot of the “Result Comparison” dialog for JUnit tests.
Some of the tests compare text that can be opened in a side-by-side comparison view for debugging. To open this view, follow these steps:
This will open up a comparison view. See below for how to use that view.
Animated GIF illustrating how to open the “Compare With” view in Eclipse.
Some of the tests compare files instead of the difference between text output. To open a comparison view for two files, follow these steps: