ApplyWildcardTest.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:jdk8u-jdk 作者:
private static int runPositiveTests() {
    int error = 0;
    for (int i = 0; i < positiveTests.length; i++) {
        System.out.println("----------------------------------------------");
        try {
            ObjectName on1 = ObjectName.getInstance(positiveTests[i][0]);
            ObjectName on2 = ObjectName.getInstance(positiveTests[i][1]);
            System.out.println("\"" + on1 + "\".apply(\"" + on2 + "\")");
            boolean result = on1.apply(on2);
            System.out.println("Result = " + result);
            if (result == false) {
                error++;
                System.out.println("Test failed!");
            } else {
                System.out.println("Test passed!");
            }
        } catch (Exception e) {
            error++;
            System.out.println("Got Unexpected Exception = " + e.toString());
            System.out.println("Test failed!");
        }
        System.out.println("----------------------------------------------");
    }
    return error;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号