Mercurial > hg4j
diff test/org/tmatesoft/hg/test/TestAuxUtilities.java @ 354:5f9073eabf06
Propagate errors with exceptions up to a end client
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 01 Dec 2011 05:21:40 +0100 |
parents | a37ce7145c3f |
children | d9dfa9fe9cec |
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/TestAuxUtilities.java Thu Dec 01 03:05:28 2011 +0100 +++ b/test/org/tmatesoft/hg/test/TestAuxUtilities.java Thu Dec 01 05:21:40 2011 +0100 @@ -25,6 +25,7 @@ import org.junit.Ignore; import org.junit.Test; import org.tmatesoft.hg.core.HgCatCommand; +import org.tmatesoft.hg.core.HgException; import org.tmatesoft.hg.core.Nodeid; import org.tmatesoft.hg.internal.ArrayHelper; import org.tmatesoft.hg.repo.HgChangelog; @@ -234,9 +235,13 @@ int i = 0; public void next(int localRevision, Nodeid revision, int linkedRevision) { - Assert.assertEquals(i++, localRevision); - Assert.assertEquals(fileNode.getChangesetLocalRevision(localRevision), linkedRevision); - Assert.assertEquals(fileNode.getRevision(localRevision), revision); + try { + Assert.assertEquals(i++, localRevision); + Assert.assertEquals(fileNode.getChangesetLocalRevision(localRevision), linkedRevision); + Assert.assertEquals(fileNode.getRevision(localRevision), revision); + } catch (HgException ex) { + Assert.fail(ex.toString()); + } } }); fileNode.walk(0, TIP, new HgDataFile.ParentInspector() {