Removed native method call

and fixed indentation.
This commit is contained in:
Mauricio Carneiro 2013-07-30 13:59:58 -04:00
parent 71eb944e62
commit 7b731dd596
1 changed files with 21 additions and 30 deletions

View File

@ -48,14 +48,9 @@ package org.broadinstitute.sting.utils.pairhmm;
import org.broadinstitute.sting.BaseTest; import org.broadinstitute.sting.BaseTest;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.List;
public class CnyPairHMMUnitTest extends BaseTest { public class CnyPairHMMUnitTest extends BaseTest {
private native void puts(String text);
@Test(enabled = true) @Test(enabled = true)
public void testResultQueue() { public void testResultQueue() {
@ -69,8 +64,7 @@ public class CnyPairHMMUnitTest extends BaseTest {
queue.push(row1); queue.push(row1);
queue.push(row2); queue.push(row2);
for (int i=0; i<row1.length; i++) for (double aRow1 : row1) Assert.assertEquals(aRow1, queue.pop());
Assert.assertEquals(row1[i], queue.pop());
for (int i=0; i<2; i++) for (int i=0; i<2; i++)
Assert.assertEquals(row2[i], queue.pop()); Assert.assertEquals(row2[i], queue.pop());
@ -80,14 +74,12 @@ public class CnyPairHMMUnitTest extends BaseTest {
for (int i=2; i<row2.length; i++) for (int i=2; i<row2.length; i++)
Assert.assertEquals(row2[i], queue.pop()); Assert.assertEquals(row2[i], queue.pop());
for (int i=0; i<row3.length; i++) for (double aRow3 : row3) Assert.assertEquals(aRow3, queue.pop());
Assert.assertEquals(row3[i], queue.pop());
// Test push/pop after return to empty state // Test push/pop after return to empty state
queue.push(row4); queue.push(row4);
for (int i=0; i<row4.length; i++) for (double aRow4 : row4) Assert.assertEquals(aRow4, queue.pop());
Assert.assertEquals(row4[i], queue.pop());
} }
@Test(enabled = true) @Test(enabled = true)
@ -96,6 +88,5 @@ public class CnyPairHMMUnitTest extends BaseTest {
CnyPairHMM.addLibraryPath(testLibPath); CnyPairHMM.addLibraryPath(testLibPath);
System.loadLibrary("CnyPairHMMUnitTest"); System.loadLibrary("CnyPairHMMUnitTest");
puts("Shared library loaded.");
} }
} }