summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-25 07:02:27 (EDT)
committerEike Stepper2007-08-25 07:02:27 (EDT)
commitd9ad9a14370999ba7aa654773360862a63240347 (patch)
tree70bfc6f8599d280adf9305aaa5fe9737f7d912df
parentdebd33662d508aa7a5136fc9e651c3ac8175a1e8 (diff)
downloadcdo-d9ad9a14370999ba7aa654773360862a63240347.zip
cdo-d9ad9a14370999ba7aa654773360862a63240347.tar.gz
cdo-d9ad9a14370999ba7aa654773360862a63240347.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SortedFileMapTest.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SortedFileMapTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SortedFileMapTest.java
index 08b9151..afafc19 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SortedFileMapTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SortedFileMapTest.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.util.tests;
import org.eclipse.net4j.util.io.ExtendedIOUtil;
+import org.eclipse.net4j.util.io.IOUtil;
import org.eclipse.net4j.util.io.SortedFileMap;
import java.io.DataInput;
@@ -25,21 +26,26 @@ public class SortedFileMapTest extends AbstractOMTest
{
public void testMap() throws Exception
{
- File file = new File("SortedFileMapTest.dat");
- SortedFileMap<Integer, String> map = new TestMap(file);
+ File file = new File("testMap.dat");
+ SortedFileMap<Integer, String> map = null;
try
{
- map.put(1, "Eike");
- map.put(3, "René");
- map.put(7, "Birte");
- map.put(9, "Mama");
- map.put(11, "Papa");
- map.put(15, "Julchen");
+ map = new TestMap(file);
+ for (int i = 0; i < 500; i++)
+ {
+ map.put(i, "Value " + i);
+ }
+
+ for (int i = 0; i < 500; i++)
+ {
+ String value = map.get(i);
+ System.out.println(value);
+ }
}
finally
{
- map.close();
+ IOUtil.close(map);
}
}