Mercurial > jhg
changeset 174:b1de83ffa7f8
Build shall succeed with no precompiled classes, too
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 30 Mar 2011 02:43:15 +0200 |
parents | 4bf061a7c001 |
children | 7653bdf82cf0 |
files | build.xml cmdline/org/tmatesoft/hg/console/Incoming.java |
diffstat | 2 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/build.xml Tue Mar 29 02:20:02 2011 +0200 +++ b/build.xml Wed Mar 30 02:43:15 2011 +0200 @@ -17,12 +17,12 @@ --> <project name="hg4j" default="samples"> <description> - Build, test and showcase hg4j + Build, test and showcase hg4j Targets: * build - compile and jar binary and source bundles * tests - run tests with JUnit * samples - few command-line counterparts to demonstrate basic capabiliites - </description> + </description> <property name="junit.jar" value="lib/junit-4.8.2.jar" /> <property name="ver.qualifier" value="" /> @@ -111,7 +111,12 @@ <target name="build-tests" depends="build-lib"> <mkdir dir="bin" /> - <javac srcdir="test" destdir="bin" /> + <javac srcdir="test" destdir="bin"> + <classpath> + <pathelement location="${hg4j.jar}"/> + <pathelement location="${junit.jar}"/> + </classpath> + </javac> <jar destfile="${hg4j-tests.jar}"> <fileset dir="bin" includes="org/tmatesoft/hg/test/**"/> <fileset file="COPYING"/> @@ -120,7 +125,7 @@ <target name="build-cmdline" depends="build-lib"> <mkdir dir="bin" /> - <javac srcdir="cmdline" destdir="bin" /> + <javac srcdir="cmdline" destdir="bin"/> <jar destfile="${hg4j-console.jar}"> <fileset dir="bin/" includes="org/tmatesoft/hg/console/**"/> <fileset file="COPYING"/>
--- a/cmdline/org/tmatesoft/hg/console/Incoming.java Tue Mar 29 02:20:02 2011 +0200 +++ b/cmdline/org/tmatesoft/hg/console/Incoming.java Wed Mar 30 02:43:15 2011 +0200 @@ -30,8 +30,6 @@ import java.util.List; import java.util.Map.Entry; -import junit.framework.Assert; - import org.tmatesoft.hg.core.Nodeid; import org.tmatesoft.hg.repo.HgChangelog; import org.tmatesoft.hg.repo.HgRemoteRepository.RemoteBranch; @@ -307,7 +305,9 @@ for (int i = 1, x = 0; root+i < head; i = i << 1, x++) { int value = data[x]; int value_check = root+i; - Assert.assertEquals(value, value_check); + if (value != value_check) { + throw new IllegalStateException(); + } int wordIx = (root + i) >>> 5; int bitIx = (root + i) & 0x1f; finalSequence[wordIx] |= 1 << (31-bitIx);