jdk/test/java/util/zip/ZipFile/LargeZipFile.java
author sherman
Thu, 02 Apr 2009 15:35:46 -0700
changeset 2438 21c111b51aa8
parent 2166 e01c813f9552
child 5506 202f599c92aa
permissions -rw-r--r--
4681995: Add support for large (> 4GB) zip/jar files Summary: The ZIP64 format support is added for > 4GB jar/zip files Reviewed-by: alanb, martin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2166
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
     1
/*
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
     2
 * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
     4
 *
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
     7
 * published by the Free Software Foundation.
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
     8
 *
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    13
 * accompanied this code).
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    14
 *
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    18
 *
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    21
 * have any questions.
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    22
 */
e01c813f9552 6809463: Missing license header in test LargeZipFile.java
kevinw
parents: 2074
diff changeset
    23
2074
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    24
import java.io.*;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    25
import java.nio.*;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    26
import java.util.*;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    27
import java.util.zip.*;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    28
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    29
public class LargeZipFile {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    30
    // If true, don't delete large ZIP file created for test.
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    31
    static final boolean debug = System.getProperty("debug") != null;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    32
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    33
    static final int DATA_LEN = 1024 * 1024;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    34
    static final int DATA_SIZE = 8;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    35
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    36
    static long fileSize = 3L * 1024L * 1024L * 1024L; // 3GB
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    37
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    38
    static boolean userFile = false;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    39
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    40
    static byte[] data;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    41
    static File largeFile;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    42
    static String lastEntryName;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    43
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    44
    /* args can be empty, in which case check a 3 GB file which is created for
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    45
     * this test (and then deleted).  Or it can be a number, in which case
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    46
     * that designates the size of the file that's created for this test (and
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    47
     * then deleted).  Or it can be the name of a file to use for the test, in
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    48
     * which case it is *not* deleted.  Note that in this last case, the data
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    49
     * comparison might fail.
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    50
     */
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    51
    static void realMain (String[] args) throws Throwable {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    52
        if (args.length > 0) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    53
            try {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    54
                fileSize = Long.parseLong(args[0]);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    55
                System.out.println("Testing with file of size " + fileSize);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    56
            } catch (NumberFormatException ex) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    57
                largeFile = new File(args[0]);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    58
                if (!largeFile.exists()) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    59
                    throw new Exception("Specified file " + args[0] + " does not exist");
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    60
                }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    61
                userFile = true;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    62
                System.out.println("Testing with user-provided file " + largeFile);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    63
            }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    64
        }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    65
        File testDir = null;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    66
        if (largeFile == null) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    67
            testDir = new File(System.getProperty("test.scratch", "."),
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    68
                                    "LargeZip");
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    69
            if (testDir.exists()) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    70
                if (!testDir.delete()) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    71
                    throw new Exception("Cannot delete already-existing test directory");
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    72
                }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    73
            }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    74
            check(!testDir.exists() && testDir.mkdirs());
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    75
            largeFile = new File(testDir, "largezip.zip");
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    76
            createLargeZip();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    77
        }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    78
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    79
        readLargeZip();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    80
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    81
        if (!userFile && !debug) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    82
            check(largeFile.delete());
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    83
            check(testDir.delete());
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    84
        }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    85
    }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    86
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    87
    static void createLargeZip() throws Throwable {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    88
        int iterations = DATA_LEN / DATA_SIZE;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    89
        ByteBuffer bb = ByteBuffer.allocate(DATA_SIZE);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    90
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    91
        for (int i = 0; i < iterations; i++) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    92
            bb.putDouble(0, Math.random());
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    93
            baos.write(bb.array(), 0, DATA_SIZE);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    94
        }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    95
        data = baos.toByteArray();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    96
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    97
        ZipOutputStream zos = new ZipOutputStream(
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    98
            new BufferedOutputStream(new FileOutputStream(largeFile)));
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
    99
        long length = 0;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   100
        while (length < fileSize) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   101
            ZipEntry ze = new ZipEntry("entry-" + length);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   102
            lastEntryName = ze.getName();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   103
            zos.putNextEntry(ze);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   104
            zos.write(data, 0, data.length);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   105
            zos.closeEntry();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   106
            length = largeFile.length();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   107
        }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   108
        System.out.println("Last entry written is " + lastEntryName);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   109
        zos.close();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   110
    }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   111
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   112
    static void readLargeZip() throws Throwable {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   113
        ZipFile zipFile = new ZipFile(largeFile);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   114
        ZipEntry entry = null;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   115
        String entryName = null;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   116
        int count = 0;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   117
        Enumeration<? extends ZipEntry> entries = zipFile.entries();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   118
        while (entries.hasMoreElements()) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   119
            entry = entries.nextElement();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   120
            entryName = entry.getName();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   121
            count++;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   122
        }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   123
        System.out.println("Number of entries read: " + count);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   124
        System.out.println("Last entry read is " + entryName);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   125
        check(!entry.isDirectory());
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   126
        if (check(entryName.equals(lastEntryName))) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   127
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   128
            InputStream is = zipFile.getInputStream(entry);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   129
            byte buf[] = new byte[4096];
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   130
            int len;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   131
            while ((len = is.read(buf)) >= 0) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   132
                baos.write(buf, 0, len);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   133
            }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   134
            baos.close();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   135
            is.close();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   136
            check(Arrays.equals(data, baos.toByteArray()));
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   137
        }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   138
        try {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   139
          zipFile.close();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   140
        } catch (IOException ioe) {/* what can you do */ }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   141
    }
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   142
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   143
    //--------------------- Infrastructure ---------------------------
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   144
    static volatile int passed = 0, failed = 0;
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   145
    static void pass() {passed++;}
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   146
    static void pass(String msg) {System.out.println(msg); passed++;}
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   147
    static void fail() {failed++; Thread.dumpStack();}
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   148
    static void fail(String msg) {System.out.println(msg); fail();}
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   149
    static void unexpected(Throwable t) {failed++; t.printStackTrace();}
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   150
    static void unexpected(Throwable t, String msg) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   151
        System.out.println(msg); failed++; t.printStackTrace();}
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   152
    static boolean check(boolean cond) {if (cond) pass(); else fail(); return cond;}
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   153
    static void equal(Object x, Object y) {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   154
        if (x == null ? y == null : x.equals(y)) pass();
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   155
        else fail(x + " not equal to " + y);}
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   156
    public static void main(String[] args) throws Throwable {
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   157
        try {realMain(args);} catch (Throwable t) {unexpected(t);}
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   158
        System.out.println("\nPassed = " + passed + " failed = " + failed);
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   159
        if (failed > 0) throw new AssertionError("Some tests failed");}
346a841b2dcc 6599383: Unable to open zip files more than 2GB in size
kevinw
parents:
diff changeset
   160
}