test/jdk/java/util/Optional/BasicLong.java
branchJDK-8195649-branch
changeset 56375 e0530ee8af48
parent 48328 7acf5700d542
child 56376 718b9df3e302
equal deleted inserted replaced
56364:ed0bfd119607 56375:e0530ee8af48
    22  */
    22  */
    23 
    23 
    24 /* @test
    24 /* @test
    25  * @summary Basic functional test of OptionalLong
    25  * @summary Basic functional test of OptionalLong
    26  * @author Mike Duigou
    26  * @author Mike Duigou
       
    27  * @build ObscureException
    27  * @run testng BasicLong
    28  * @run testng BasicLong
    28  */
    29  */
    29 
    30 
    30 import java.util.NoSuchElementException;
    31 import java.util.NoSuchElementException;
    31 import java.util.OptionalLong;
    32 import java.util.OptionalLong;
   199             long[] es = s.toArray();
   200             long[] es = s.toArray();
   200             assertEquals(es.length, 1);
   201             assertEquals(es.length, 1);
   201             assertEquals(es[0], 42L);
   202             assertEquals(es[0], 42L);
   202         }
   203         }
   203     }
   204     }
   204 
       
   205     private static class ObscureException extends RuntimeException {
       
   206 
       
   207     }
       
   208 }
   205 }