[Joafip-svn] SF.net SVN: joafip:[2997] trunk/joafip-heapfile/src
Brought to you by:
luc_peuvrier
|
From: <luc...@us...> - 2012-04-08 06:48:25
|
Revision: 2997
http://joafip.svn.sourceforge.net/joafip/?rev=2997&view=rev
Author: luc_peuvrier
Date: 2012-04-08 06:48:19 +0000 (Sun, 08 Apr 2012)
Log Message:
-----------
warning correction
Modified Paths:
--------------
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManagerImpl.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java
Removed Paths:
-------------
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManagerImpl.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManagerImpl.java 2012-04-08 03:03:31 UTC (rev 2996)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManagerImpl.java 2012-04-08 06:48:19 UTC (rev 2997)
@@ -38,6 +38,8 @@
public abstract class AbstractTestHeapDataManagerImpl extends
AbstractTestHeapDataManagerRecord {
+ private static final String BAD_VALUE = "bad value";
+
private static final String MUST_DELETE_1 = "must delete #1";
private static final String MUST_NOT_HAVE_DATA_RECORD = "must not have data record";
@@ -383,7 +385,7 @@
final DataRecordIdentifier identifier = new DataRecordIdentifier(0);
data = heapDataManager.readDataRecord(identifier);
for (int index = 0; index < 20; index++) {
- assertEquals("bad value", data[index], index);
+ assertEquals(BAD_VALUE, data[index], index);
}
for (int index = 0; index < 20; index++) {
data[index] = (byte) (10 + index);
@@ -393,7 +395,7 @@
createHeap(false/* remove file */);
data = heapDataManager.readDataRecord(identifier);
for (int index = 0; index < 20; index++) {
- assertEquals("bad value", data[index], 10 + index);
+ assertEquals(BAD_VALUE, data[index], 10 + index);
}
}
@@ -615,10 +617,10 @@
heapDataManager.flush();
identifier = heapDataManager.removeFirstDataRecord();
assertNotNull("must deleted first data record", identifier);
- assertEquals(0L, identifier.value);
+ assertEquals(BAD_VALUE,0L, identifier.value);
identifier = heapDataManager.removeFirstDataRecord();
assertNotNull("must deleted first data record", identifier);
- assertEquals(1L, identifier.value);
+ assertEquals(BAD_VALUE,1L, identifier.value);
assertNull(MUST_NOT_HAVE_DATA_RECORD,
heapDataManager.removeFirstDataRecord());
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java 2012-04-08 03:03:31 UTC (rev 2996)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java 2012-04-08 06:48:19 UTC (rev 2997)
@@ -58,7 +58,7 @@
assertTrue("must found 'A'", heapDataManager.hasDataRecord(keyA));
final byte[] readDataA = heapDataManager.readDataRecord(keyA);
assertNotNull("must read 'A' data", readDataA);
- assertEquals("valueA", new String(readDataA));
+ assertEquals("bad value","valueA", new String(readDataA));
}
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|