< prev index next >

test/testlibrary_tests/RandomGeneratorTest.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @summary Verify correctnes of the random generator from Utility.java
  27  * @library /testlibrary

  28  * @run driver RandomGeneratorTest SAME_SEED
  29  * @run driver RandomGeneratorTest NO_SEED
  30  * @run driver RandomGeneratorTest DIFFERENT_SEED
  31  */
  32 
  33 import com.oracle.java.testlibrary.ProcessTools;
  34 import com.oracle.java.testlibrary.Utils;
  35 import java.util.ArrayList;
  36 import java.util.List;
  37 import java.util.Random;
  38 
  39 /**
  40  * The test verifies correctness of work {@link com.oracle.java.testlibrary.Utils#getRandomInstance()}.
  41  * Test works in three modes: same seed provided, no seed provided and
  42  * different seed provided. In the first case the test expects that all random numbers
  43  * will be repeated in all next iterations. For other two modes test expects that
  44  * randomly generated numbers differ from original.
  45  */
  46 public class RandomGeneratorTest {
  47     private static final String SEED_VM_OPTION = "-D" + Utils.SEED_PROPERTY_NAME + "=";




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @summary Verify correctnes of the random generator from Utility.java
  27  * @library /testlibrary
  28  * @build com.oracle.java.testlibrary.*
  29  * @run driver RandomGeneratorTest SAME_SEED
  30  * @run driver RandomGeneratorTest NO_SEED
  31  * @run driver RandomGeneratorTest DIFFERENT_SEED
  32  */
  33 
  34 import com.oracle.java.testlibrary.ProcessTools;
  35 import com.oracle.java.testlibrary.Utils;
  36 import java.util.ArrayList;
  37 import java.util.List;
  38 import java.util.Random;
  39 
  40 /**
  41  * The test verifies correctness of work {@link com.oracle.java.testlibrary.Utils#getRandomInstance()}.
  42  * Test works in three modes: same seed provided, no seed provided and
  43  * different seed provided. In the first case the test expects that all random numbers
  44  * will be repeated in all next iterations. For other two modes test expects that
  45  * randomly generated numbers differ from original.
  46  */
  47 public class RandomGeneratorTest {
  48     private static final String SEED_VM_OPTION = "-D" + Utils.SEED_PROPERTY_NAME + "=";


< prev index next >