test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/src/jdk/test/Main.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/src/jdk/test/Main.java	Tue Apr 24 16:18:39 2018
--- new/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/src/jdk/test/Main.java	Tue Apr 24 16:18:38 2018

*** 1,7 **** --- 1,7 ---- /* ! * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 94,108 **** --- 94,110 ---- throw new RuntimeException(testName + " FAILED: " + clazz + " loaded by " + actualLoader + ", expected " + expectedLoader); } // Make sure we got the right version of the class. toString() of an instance // of the overridden version of the class should return "hi". + if (actualLoader == SYS_LOADER) { String s = clazz.newInstance().toString(); if (!s.equals("hi")) { throw new RuntimeException(testName + " FAILED: toString() returned \"" + s + "\" instead of \"hi\"" ); } + } System.out.println(testName + " PASSED: class loaded as expected."); } else { throw new RuntimeException(testName + " FAILED: class loaded, but should have failed to load."); } } else {

test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/src/jdk/test/Main.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File