Skip to content

Commit

Permalink
Augmentation de la marge d'erreur + plus souple sur les tests de charge
Browse files Browse the repository at this point in the history
  • Loading branch information
sapk committed Oct 11, 2015
1 parent d820dd2 commit 1d74eee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions script/test-charge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ time ./simulateur $ARGS -mess 1000 -nbEch 30

time ./simulateur $ARGS -mess 10000 -nbEch 30

time ./simulateur $ARGS -mess 100000 -nbEch 30
#time ./simulateur $ARGS -mess 100000 -nbEch 30

time ./simulateur $ARGS -mess 999999 -nbEch 30
#time ./simulateur $ARGS -mess 999999 -nbEch 30


time ./simulateur $ARGS -mess 10000 -nbEch 3
Expand All @@ -19,5 +19,5 @@ time ./simulateur $ARGS -mess 10000 -nbEch 30

time ./simulateur $ARGS -mess 10000 -nbEch 300

time ./simulateur $ARGS -mess 100000 -nbEch 300
#time ./simulateur $ARGS -mess 100000 -nbEch 300

6 changes: 3 additions & 3 deletions test/sources/SourceBruitGaussienTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void testConstructeur2() {
@Test
public void testRepartion() {
System.out.println("Test Repartition SourceBruitGaussien");
int nbEch = 1000000; //TODO augmenter
int nbEch = 10000000;
float puissance = 10;
SourceBruitGaussien instance = new SourceBruitGaussien(nbEch, puissance);
assertEquals(instance.informationGeneree.nbElements(), nbEch);
Expand All @@ -77,7 +77,7 @@ public void testRepartion() {

Float min = stat.getMin();
Float max = stat.getMax();
int nbInterval = 10000;
int nbInterval = 100000;
Float interval = (max - min) / nbInterval;
float[] repartition = new float[nbInterval];
//System.out.println("Min : " + min + " Max : " + max + " Interval : " + interval);
Expand All @@ -89,7 +89,7 @@ public void testRepartion() {
}
}
System.out.println("à 50% : " + repartition[nbInterval / 2 + 1] + " >= " + 0.5f * nbEch);
assertTrue(repartition[nbInterval / 2 + 1] >= (0.50f - margeErreur ) * nbEch); // on vérifie au centre avec une marge de 5%
assertTrue(repartition[nbInterval / 2 + 1] >= (0.50f - margeErreur*2 ) * nbEch); // on vérifie au centre avec une marge de 5%
//TODO add more value to test
}
}

0 comments on commit 1d74eee

Please sign in to comment.