Update of /cvsroot/cweb/bigdata/src/java/com/bigdata/btree
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28891/src/java/com/bigdata/btree
Modified Files:
BytesUtil.java
Log Message:
Updated the linux JNI BytesUtil library, modified the main routine to run the JNI versions of the methods so that it provides a handy installation test.
Index: BytesUtil.java
===================================================================
RCS file: /cvsroot/cweb/bigdata/src/java/com/bigdata/btree/BytesUtil.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BytesUtil.java 13 Apr 2007 15:04:12 -0000 1.1
--- BytesUtil.java 13 Apr 2007 15:55:12 -0000 1.2
***************
*** 582,588 ****
}
public static void main(String[] args) {
! if( 0 != BytesUtil.compareBytes(new byte[]{1,2,3}, new byte[]{1,2,3}) ) {
throw new AssertionError();
--- 582,598 ----
}
+ /**
+ * This method tries to execute the JNI methods.
+ *
+ * @param args
+ *
+ * @exception UnsatisfiedLinkError
+ * if the JNI methods can not be resolved.
+ * @exception AssertionError
+ * if the JNI methods do not produce the expected answers.
+ */
public static void main(String[] args) {
! if( 0 != BytesUtil._compareBytes(3, new byte[]{1,2,3}, 3, new byte[]{1,2,3}) ) {
throw new AssertionError();
***************
*** 590,594 ****
}
! if( 0 != BytesUtil.compareBytesWithLenAndOffset(0, 3, new byte[]{1,2,3}, 0, 3, new byte[]{1,2,3}) ) {
throw new AssertionError();
--- 600,604 ----
}
! if( 0 != BytesUtil._compareBytesWithOffsetAndLen(0, 3, new byte[]{1,2,3}, 0, 3, new byte[]{1,2,3}) ) {
throw new AssertionError();
|