Pack200Test.java revision 2668
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6521334 6712743
* using native and java unpackers
* @compile -XDignore.symbol.file Utils.java Pack200Test.java
* @author ksrini
*/
/**
*/
public class Pack200Test {
static final long m0 = getUsedMemory();
/** Creates a new instance of Pack200Test */
private Pack200Test() {}
static long getUsedMemory() {
}
if ( diff > LEAK_TOLERANCE) {
}
}
private static void doPackUnpack() {
try {
// Write out to a jtreg scratch area
// Call the packer
leakCheck();
// Write out to current directory, jtreg will setup a scratch area
new FileOutputStream(javaUnpackedJar));
leakCheck();
// Ok we have unpacked the file, lets test it.
// Write out to current directory
leakCheck();
// the unpackers (native and java) should produce identical bits
// so we use use bit wise compare, the verification compare is
// very expensive wrt. time.
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
}
}
}
/**
* @param args the command line arguments
*/
// select the jars carefully, adding more jars will increase the
// testing time, especially for jprt.
doPackUnpack();
}
}