Test.java revision 414
414N/A * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. 414N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 414N/A * This code is free software; you can redistribute it and/or modify it 414N/A * under the terms of the GNU General Public License version 2 only, as 414N/A * published by the Free Software Foundation. 414N/A * This code is distributed in the hope that it will be useful, but WITHOUT 414N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 414N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 414N/A * version 2 for more details (a copy is included in the LICENSE file that 414N/A * accompanied this code). 414N/A * You should have received a copy of the GNU General Public License version 414N/A * 2 along with this work; if not, write to the Free Software Foundation, 414N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 414N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 414N/A * CA 95054 USA or visit www.sun.com if you need additional information or 414N/A * @summary FileObject should support user-friendly names via getName() 414N/A// Test FileObject.getName returned from JavacFileManager and its support classes. 414N/A // names for entries to be created in directories and jar files 414N/A // test various combinations of directories and jar files, intended to 414N/A // cover all sources of file objects within JavacFileManager's support classes 414N/A // Verify that we hit all the impl classes we intended 414N/A "RegularFileObject",
"SymbolFileObject",
"ZipFileIndexFileObject",
"ZipFileObject");
414N/A // Verify that we hit the jar files we intended, specifically ct.sym as well as rt.jar 414N/A "ct.sym",
"jar",
"jar jar",
"rt.jar");
414N/A // use a new file manager for each test 414N/A // we could use fm.getLocation but the following guarantees we preserve the original filename 414N/A // if ct.sym is found, replace it with the equivalent rt.jar 414N/A // record the file object class name for coverage checks later 414N/A // record access to the jar file for coverage checks later 414N/A // javac should really not be using system properties like this 414N/A // -- it should really be using (hidden) options -- but until then 414N/A // take care to leave system properties as we find them, so as not 414N/A // to adversely affect other tests that might follow.