test/tools/javap/T6868539.java

changeset 2288
4267f38a1706
parent 798
4868a36f6fd8
child 2525
2eb010b6cb22
equal deleted inserted replaced
2287:b2bc7b778287 2288:4267f38a1706
21 * questions. 21 * questions.
22 */ 22 */
23 23
24 /* 24 /*
25 * @test 25 * @test
26 * @bug 6868539 6868548 26 * @bug 6868539 6868548 8035364
27 * @summary javap should use current names for constant pool entries, 27 * @summary javap should use current names for constant pool entries,
28 * remove spurious ';' from constant pool entries 28 * remove spurious ';' from constant pool entries
29 */ 29 */
30 30
31 import java.io.*; 31 import java.io.*;
39 } 39 }
40 40
41 void run() { 41 void run() {
42 String output = javap("T6868539"); 42 String output = javap("T6868539");
43 verify(output, "Utf8 +java/lang/String"); // 1: Utf8 43 verify(output, "Utf8 +java/lang/String"); // 1: Utf8
44 // 2: currently unused 44 // 2: currently unused
45 verify(output, "Integer +123456"); // 3: Integer 45 verify(output, "Integer +123456"); // 3: Integer
46 verify(output, "Float +123456.0f"); // 4: Float 46 verify(output, "Float +123456.0f"); // 4: Float
47 verify(output, "Long +123456l"); // 5: Long 47 verify(output, "Long +123456l"); // 5: Long
48 verify(output, "Double +123456.0d"); // 6: Double 48 verify(output, "Double +123456.0d"); // 6: Double
49 verify(output, "Class +#[0-9]+ +// + T6868539"); // 7: Class 49 verify(output, "Class +#[0-9]+ +// +T6868539"); // 7: Class
50 verify(output, "String +#[0-9]+ +// + not found"); // 8: String 50 verify(output, "String +#[0-9]+ +// +not found"); // 8: String
51 verify(output, "Fieldref +#[0-9]+\\.#[0-9]+ +// +T6868539.errors:I"); // 9: Fieldref 51 verify(output, "Fieldref +#[0-9]+\\.#[0-9]+ +// +T6868539.errors:I"); // 9: Fieldref
52 verify(output, "Methodref +#[0-9]+\\.#[0-9]+ +// +T6868539.run:\\(\\)V"); // 10: Methodref 52 verify(output, "Methodref +#[0-9]+\\.#[0-9]+ +// +T6868539.run:\\(\\)V"); // 10: Methodref
53 verify(output, "InterfaceMethodref +#[0-9]+\\.#[0-9]+ +// +java/lang/Runnable\\.run:\\(\\)V"); 53 verify(output, "InterfaceMethodref +#[0-9]+\\.#[0-9]+ +// +java/lang/Runnable\\.run:\\(\\)V");
54 // 11: InterfaceMethodref 54 // 11: InterfaceMethodref
55 verify(output, "NameAndType +#[0-9]+:#[0-9]+ +// +run:\\(\\)V"); // 12: NameAndType 55 verify(output, "NameAndType +#[0-9]+:#[0-9]+ +// +run:\\(\\)V"); // 12: NameAndType
56 if (errors > 0) 56 if (errors > 0)
57 throw new Error(errors + " found."); 57 throw new Error(errors + " found.");
58 } 58 }
59 59

mercurial