equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test 8173232 |
25 * @test 8173232 8010319 |
26 * @summary Test of forward referencing of snippets. |
26 * @summary Test of forward referencing of snippets. |
27 * @build KullaTesting TestingInputStream |
27 * @build KullaTesting TestingInputStream |
28 * @run testng ForwardReferenceTest |
28 * @run testng ForwardReferenceTest |
29 */ |
29 */ |
30 |
30 |
313 |
313 |
314 public void testLocalClassInUnresolved() { |
314 public void testLocalClassInUnresolved() { |
315 Snippet f = methodKey(assertEval("void f() { class A {} g(); }", added(RECOVERABLE_DEFINED))); |
315 Snippet f = methodKey(assertEval("void f() { class A {} g(); }", added(RECOVERABLE_DEFINED))); |
316 assertEval("void g() {}", |
316 assertEval("void g() {}", |
317 added(VALID), |
317 added(VALID), |
318 ste(f, RECOVERABLE_DEFINED, VALID, false, null)); |
318 ste(f, RECOVERABLE_DEFINED, VALID, true, null)); |
319 assertEval("f();", ""); |
319 assertEval("f();", ""); |
320 } |
320 } |
321 } |
321 } |