jjg@338: /* ohair@554: * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. jjg@338: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jjg@338: * jjg@338: * This code is free software; you can redistribute it and/or modify it jjg@338: * under the terms of the GNU General Public License version 2 only, as jjg@338: * published by the Free Software Foundation. jjg@338: * jjg@338: * This code is distributed in the hope that it will be useful, but WITHOUT jjg@338: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jjg@338: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jjg@338: * version 2 for more details (a copy is included in the LICENSE file that jjg@338: * accompanied this code). jjg@338: * jjg@338: * You should have received a copy of the GNU General Public License version jjg@338: * 2 along with this work; if not, write to the Free Software Foundation, jjg@338: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jjg@338: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. jjg@338: */ jjg@338: jjg@338: import java.io.*; jjg@338: jjg@338: /* jjg@338: * @test jjg@338: * @bug 6855990 jjg@338: * @summary InstructionDetailWriter should support new 308 annotations attribute jjg@338: */ jjg@338: jjg@338: public class T6855990 { jjg@338: public static void main(String[] args) throws Exception { jjg@338: new T6855990().run(); jjg@338: } jjg@338: jjg@338: public void run() throws Exception { jjg@338: @Simple String[] args = { "-c", "-XDdetails:typeAnnotations", "T6855990" }; jjg@338: StringWriter sw = new StringWriter(); jjg@338: PrintWriter pw = new PrintWriter(sw); jjg@338: int rc = com.sun.tools.javap.Main.run(args, pw); jjg@338: pw.close(); jjg@338: String out = sw.toString(); jjg@338: System.out.println(out); jjg@338: if (out.indexOf("@Simple: LOCAL_VARIABLE") == -1) jjg@338: throw new Exception("expected output not found"); jjg@338: } jjg@338: } jjg@338: jjg@338: @interface Simple { } jjg@338: