1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
Description: omitting checks of which success depends on random variables
Also in PasswordTest.java, it can happen that the same 1-character password
is generated twice in a row (also with other lengths!). So I am discarding the
tests with length 1 or 2.
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2022-09-19
--- a/src/test/java/org/ojalgo/data/domain/finance/portfolio/TestEquilibrium.java
+++ b/src/test/java/org/ojalgo/data/domain/finance/portfolio/TestEquilibrium.java
@@ -190,7 +190,7 @@
TestUtils.assertEquals(generatedWeights, modelBL.getAssetWeights(), weightsContext);
MarkowitzModel modelM = new MarkowitzModel(equilibrium, matchingReturns);
- TestUtils.assertEquals(generatedWeights, modelM.getAssetWeights(), weightsContext);
+ //TestUtils.assertEquals(generatedWeights, modelM.getAssetWeights(), weightsContext);
}
}
--- a/src/test/java/org/ojalgo/random/RandomNumberTest.java
+++ b/src/test/java/org/ojalgo/random/RandomNumberTest.java
@@ -23,6 +23,7 @@
import static org.ojalgo.function.constant.PrimitiveMath.*;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.ojalgo.TestUtils;
import org.ojalgo.array.ArrayR064;
@@ -265,6 +266,7 @@
this.testDist2(new Dist2Gamma(), new double[] { .01, .01 }, new double[] { 10, 10 }, new double[] { 100, 100 }, 200000, .15);
}
+ @Disabled("Fails randomly")
@Test
public void testGeometricMeanAndStandardDeviation() {
@@ -313,6 +315,7 @@
// Check that the geometric standard deviation is within ±0.01% of what it should be.
}
+ @Disabled("Fails randomly")
@Test
public void testLogNormal() {
@@ -460,7 +463,7 @@
double tmpActualVar = tmpSampleSet.getVariance();
- TestUtils.assertEquals(tmpExpectedVar, tmpActualVar, SQRT.invoke(TEN)); // Won't always pass - it's random...
+ //TestUtils.assertEquals(tmpExpectedVar, tmpActualVar, SQRT.invoke(TEN)); // Won't always pass - it's random...
tmpExpectedVar = tmpSampleSet.getSumOfSquares() / (tmpSampleSet.size() - 1);
--- a/src/test/java/org/ojalgo/netio/PasswordTest.java
+++ b/src/test/java/org/ojalgo/netio/PasswordTest.java
@@ -45,7 +45,7 @@
@Test
public void testGeneration() {
- for (int i = 1; i < 100; i++) {
+ for (int i = 3; i < 100; i++) {
String original = Password.makePlainText(i);
|