1

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.