I am developing a simple android application using eclipse. I wrote a JUnit TestCase for a class I wrote. One particular test compares two 2d arrays so see if they are equal. If they are not equal the test fails. When the test fails I would like to print out the contents of the offending array to see what went wrong. I have tried System.out.print and it doesn't show up in the console or JUnit results. What am I doing wrong? Is it even possible?
views:
13answers:
1
A:
You can use Log to write to the LogCat window in Eclipse.
ETA: Screenshot of the LogCat window in Eclipse with some logging code highlighted.
eldarerathis
2010-08-08 21:42:07
Thanks, I couldn't get it to print in eclipse for some reason, but in the shell I ran adb logcat Class:V *:S and it work works perfect.
Jim
2010-08-08 22:44:45