Skip to content

Commit

Permalink
Merge pull request #6 from pereferrera/master
Browse files Browse the repository at this point in the history
Added 3 test cases to show #5, ArrayIndexOutOfBoundsException in AbstractPolychoricCorrelation
  • Loading branch information
meyerjp3 committed May 12, 2015
2 parents 3309c2b + af6322e commit 9683699
Showing 1 changed file with 47 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,51 @@ public void incrementalTwoStepTest(){

}


@Test
public void emptyCasesTest1() {
double[][] caseMatrix = new double[2][2];

caseMatrix[0][0] = 0;
caseMatrix[0][1] = 1;
caseMatrix[1][0] = 0;
caseMatrix[1][1] = 16;

new PolychoricTwoStep(caseMatrix);
}

@Test
public void emptyCasesTest2() {
double[][] caseMatrix = new double[2][2];

caseMatrix[0][0] = 0;
caseMatrix[0][1] = 0;
caseMatrix[1][0] = 0;
caseMatrix[1][1] = 16;

new PolychoricTwoStep(caseMatrix);
}

@Test
public void emptyCasesTest3() {
double[][] caseMatrix = new double[2][2];

caseMatrix[0][0] = 0;
caseMatrix[0][1] = 0;
caseMatrix[1][0] = 1;
caseMatrix[1][1] = 16;

new PolychoricTwoStep(caseMatrix);
}

@Test
public void emptyCasesTest4() {
double[][] caseMatrix = new double[2][2];

caseMatrix[0][0] = 1;
caseMatrix[0][1] = 0;
caseMatrix[1][0] = 0;
caseMatrix[1][1] = 16;

new PolychoricTwoStep(caseMatrix);
}
}

0 comments on commit 9683699

Please sign in to comment.