コード例 #1
0
ファイル: AssertsTest.java プロジェクト: FauxFaux/jdk9-jdk
 @SuppressWarnings("unchecked")
 private static <T extends Comparable<T>> void expectFail(Assertion assertion, T... args)
     throws Exception {
   try {
     Assertion.run(assertion, args);
   } catch (RuntimeException e) {
     return;
   }
   throw new Exception(
       "Expected "
           + Assertion.format(assertion, (Object[]) args)
           + " to throw a RuntimeException");
 }
コード例 #2
0
ファイル: AssertsTest.java プロジェクト: FauxFaux/jdk9-jdk
 @SuppressWarnings("unchecked")
 private static <T extends Comparable<T>> void expectPass(Assertion assertion, T... args)
     throws Exception {
   Assertion.run(assertion, args);
 }