diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2015-03-03 10:37:39 +0100 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2015-03-03 10:37:39 +0100 |
commit | 040e11f6c4d69ff337dca9afc1b2cb473d5b5bef (patch) | |
tree | a01d5227ae90f8db4926db8b21ded89b769ec0a7 /tests | |
parent | aa48a1d49e843dda18ea777303bb1014808b72fe (diff) | |
download | cgeo-040e11f6c4d69ff337dca9afc1b2cb473d5b5bef.zip cgeo-040e11f6c4d69ff337dca9afc1b2cb473d5b5bef.tar.gz cgeo-040e11f6c4d69ff337dca9afc1b2cb473d5b5bef.tar.bz2 |
Give better explanation of what went wrong in test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/cgeo/geocaching/files/GPXImporterTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/src/cgeo/geocaching/files/GPXImporterTest.java b/tests/src/cgeo/geocaching/files/GPXImporterTest.java index 9426fe8..86fa90d 100644 --- a/tests/src/cgeo/geocaching/files/GPXImporterTest.java +++ b/tests/src/cgeo/geocaching/files/GPXImporterTest.java @@ -153,11 +153,11 @@ public class GPXImporterTest extends AbstractResourceInstrumentationTestCase { assertThat(cache.getName()).isEqualTo("First Aid Station #1"); } - private void assertImportStepMessages(int... importSteps) { - assertThat(importStepHandler.messages).hasSize(importSteps.length); - for (int i = 0; i < importSteps.length; i++) { + private void assertImportStepMessages(final int... importSteps) { + for (int i = 0; i < Math.min(importSteps.length, importStepHandler.messages.size()); i++) { assertThat(importStepHandler.messages.get(i).what).isEqualTo(importSteps[i]); } + assertThat(importStepHandler.messages).hasSize(importSteps.length); } public void testImportLoc() throws IOException { |