This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git


The following commit(s) were added to refs/heads/master by this push:
     new cb9d99d  Removed spurious assert statement from 
ProvidersCommonParametricTest.
cb9d99d is described below

commit cb9d99d5b78dce706874bf1bf760309d14684873
Author: aherbert <aherb...@apache.org>
AuthorDate: Thu Feb 14 17:00:19 2019 +0000

    Removed spurious assert statement from ProvidersCommonParametricTest.
    
    The assertion that the intSeed is not equal to the original seed will
    invoke Integer.equals(Object). I think the intention is to test the type
    of the seed is correct, not the value.
---
 .../apache/commons/rng/simple/ProvidersCommonParametricTest.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersCommonParametricTest.java
 
b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersCommonParametricTest.java
index 513ddbf..8b58ec4 100644
--- 
a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersCommonParametricTest.java
+++ 
b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersCommonParametricTest.java
@@ -97,11 +97,14 @@ public class ProvidersCommonParametricTest {
         int seedCount = 0;
         for (Object s : seeds) {
             ++seedCount;
-            if (!(originalSource.isNativeSeed(s))) {
+            if (originalSource.isNativeSeed(s)) {
+                Assert.assertNotNull("Identified native seed is null", s);
+                Assert.assertEquals("Incorrect identification of native seed 
type",
+                                    s.getClass(), originalSeed.getClass());
+            } else {
                 ++nonNativeSeedCount;
             }
 
-            Assert.assertNotEquals(intSeed, originalSeed);
             RandomSource.create(originalSource, s, originalArgs);
         }
 

Reply via email to