Patch: test case for PR 160

Anthony Green green@cygnus.com
Sat Mar 4 23:20:00 GMT 2000


I'm committing the following test case from Bryce.

BTW - Bryce - you should feel free to just check tests like this in.


2000-03-04  Anthony Green  <green@redhat.com>

	* libjava.lang/PR160.java: New file.
	* libjava.lang/PR160.out: New file.


? libjava/testsuite/libjava.lang/PR160
Index: libjava/testsuite/libjava.lang/PR160.java
===================================================================
RCS file: PR160.java
diff -N PR160.java
0a1,34
> public class PR160
> {
>   static final int len = 100;
>   
>   public static void main(String args[])
>   {
>     
>     double[] a = new double[len];
>     double[] b = new double[len];
>     
>     for (int i = 0; i < len ; i++)
>       {
> 	a[i] = 0.65;
>       }
>     
>     System.arraycopy(a, 0, b, 0, len);
>     
>     boolean errors = false;
>     
>     for (int i = 0; i < len ; i++)
>       {
> 	if (a[i] != b[i])
> 	  {
> 	    System.out.println("ERROR! " + a[i] + " != " 
> 			       + b[i] + " at index " + i);
> 	    errors = true;
> 	  }
>       }
>     
>     if (!errors)
>       System.out.println("ok");
>     
>   }
> }
Index: libjava/testsuite/libjava.lang/PR160.out
===================================================================
RCS file: PR160.out
diff -N PR160.out
0a1
> ok


More information about the Java-patches mailing list