That is a good idea.  I will add that to the multivariate normal distribution 
unit tests that I recently sent.
________________________________________
From: Gilles Sadowski [gil...@harfang.homelinux.org]
Sent: Sunday, July 22, 2012 5:44 PM
To: dev@commons.apache.org
Subject: [Math] Random tests sometimes fail (r1363105)

Hi Thomas.

I've encountered a failure of one the tests which you introduced in
revision 1363105.  Here is an excerpt of the error:
---
testNormalDistributionUnsymmetricMatrix(org.apache.commons.math3.linear.EigenDecompositionTest)
Time elapsed: 0.044 sec  <<< FAILURE!
java.lang.AssertionError: The norm of (X-Y) is too large
        at org.junit.Assert.fail(Assert.java:93)
        at org.junit.Assert.assertTrue(Assert.java:43)
        at 
org.apache.commons.math3.linear.EigenDecompositionTest.checkUnsymmetricMatrix(EigenDecompositionTest.java:422)
        at 
org.apache.commons.math3.linear.EigenDecompositionTest.testNormalDistributionUnsymmetricMatrix(EigenDecompositionTest.java:404)
[... etc ...]
---

For tests that uses a RNG, the conclusion was reached that it is better (for
unit tests) to select a seed for which the test succeeds.


Regards,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Email Disclaimer:  www.stjude.org/emaildisclaimer
Consultation Disclaimer:  www.stjude.org/consultationdisclaimer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to