Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2009 IBM Corporation and others. |
2 |
* Copyright (c) 2009, 2011 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 286-291
Link Here
|
286 |
" inner name: #24 D, accessflags: 8 static]\n"; |
286 |
" inner name: #24 D, accessflags: 8 static]\n"; |
287 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "p" + File.separator + "X.class", "X", expectedOutput); |
287 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "p" + File.separator + "X.class", "X", expectedOutput); |
288 |
} |
288 |
} |
|
|
289 |
public void test14() throws Exception { |
290 |
runConformTest(new String[] { |
291 |
"LineNumberBug.java", |
292 |
"public class LineNumberBug {\n" + |
293 |
" class Inner {\n" + |
294 |
" public Inner() {\n" + |
295 |
" System.out.println(\"Inner()\");\n" + |
296 |
" }\n" + |
297 |
" }\n" + |
298 |
" public static void main(String[] args) {\n" + |
299 |
" new LineNumberBug().new Inner();\n" + |
300 |
" }\n" + |
301 |
"}\n" |
302 |
}); |
303 |
String expectedOutput = |
304 |
" // Method descriptor #8 (LLineNumberBug;)V\n" + |
305 |
" // Stack: 2, Locals: 2\n" + |
306 |
" public LineNumberBug$Inner(LineNumberBug arg0);\n" + |
307 |
" 0 aload_0 [this]\n" + |
308 |
" 1 aload_1 [arg0]\n" + |
309 |
" 2 putfield LineNumberBug$Inner.this$0 : LineNumberBug [10]\n" + |
310 |
" 5 aload_0 [this]\n" + |
311 |
" 6 invokespecial java.lang.Object() [12]\n" + |
312 |
" 9 getstatic java.lang.System.out : java.io.PrintStream [15]\n" + |
313 |
" 12 ldc <String \"Inner()\"> [21]\n" + |
314 |
" 14 invokevirtual java.io.PrintStream.println(java.lang.String) : void [23]\n" + |
315 |
" 17 return\n" + |
316 |
" Line numbers:\n" + |
317 |
" [pc: 5, line: 3]\n" + |
318 |
" [pc: 9, line: 4]\n" + |
319 |
" [pc: 17, line: 5]\n"; |
320 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "LineNumberBug$Inner.class", "LineNumberBug$Inner", expectedOutput); |
321 |
} |
289 |
public static Class testClass() { |
322 |
public static Class testClass() { |
290 |
return InnerEmulationTest_1_5.class; |
323 |
return InnerEmulationTest_1_5.class; |
291 |
} |
324 |
} |