Commit 0a994266 authored by panneton's avatar panneton Committed by Brian Panneton

ENH: Added Java Test to make sure the Garbage Collector works correctly

parent 6fa7fe7b
......@@ -20,6 +20,7 @@ ADD_TEST_JAVA_LDPATH("")
# ------------------------
ADD_TEST_JAVA(TestXdmfJava)
ADD_TEST_JAVA(TestXdmfEquals)
ADD_TEST_JAVA(TestXdmfGC)
# Add any java cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
......@@ -30,6 +31,7 @@ CLEAN_TEST_JAVA(TestXdmfJava
outputJavaTest.xmf
)
CLEAN_TEST_JAVA(TestXdmfEquals)
CLEAN_TEST_JAVA(TestXdmfGC outputXdmfGC.xmf)
# Add a custom target for all java tests
# Note: ${TARGETS} is set in ADD_TEST_JAVA
......
import mil.army.arl.xdmf.*;
public class TestXdmfGC {
public static void main (String argv[]) {
System.out.println("Hello Java World (Garbage Collector)");
for(int i = 0; i < 10; i++)
{
System.gc();
XdmfWriter w = XdmfWriter.New("outputXdmfGC");
XdmfDomain d = XdmfDomain.New();
d.accept(w);
}
System.out.println("Done");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment